aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-01-20 06:51:10 +0000
committerErlang/OTP <[email protected]>2010-01-20 06:51:10 +0000
commit9bf84f381797df7411335fed11ee83886b09514f (patch)
tree8409c4b5ded2b5c4e67b86099ce15a4e75b875aa /erts/etc/common
parentb408b344732b5a20d996d1cb88a40a3e46247271 (diff)
parent96773ebcef2fe5949695a4fd923343ec4b049087 (diff)
downloadotp-9bf84f381797df7411335fed11ee83886b09514f.tar.gz
otp-9bf84f381797df7411335fed11ee83886b09514f.tar.bz2
otp-9bf84f381797df7411335fed11ee83886b09514f.zip
Merge branch 'cf/compile_warning_as_error' into ccase/r13b04_dev
* cf/compile_warning_as_error: Add option -Werror in erlc(1) compile: add flag warnings_as_errors to treat warnings as errors compile.erl: remove trailing whitespace OTP-8382 The -Werror option for erlc and the compiler option warnings_as_errors will cause warnings to be treated as errors. (Thanks to Christopher Faulet.)
Diffstat (limited to 'erts/etc/common')
-rw-r--r--erts/etc/common/erlc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c
index c958fed741..09aca19e6c 100644
--- a/erts/etc/common/erlc.c
+++ b/erts/etc/common/erlc.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1997-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1997-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
/*
@@ -310,6 +310,8 @@ main(int argc, char** argv)
case 'W': /* Enable warnings. */
if (strcmp(argv[1]+2, "all") == 0) {
PUSH2("@warn", "999");
+ } else if (strcmp(argv[1]+2, "error") == 0) {
+ PUSH2("@option", "warnings_as_errors");
} else if (isdigit((int)argv[1][2])) {
PUSH2("@warn", argv[1]+2);
} else {
@@ -566,6 +568,7 @@ usage(void)
{"-pz path", "add path to the end of Erlang's code path"},
{"-smp", "compile using SMP emulator"},
{"-v", "verbose compiler output"},
+ {"-Werror", "make all warnings into errors"},
{"-W0", "disable warnings"},
{"-Wnumber", "set warning level to number"},
{"-Wall", "enable all warnings"},