aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/compile/snmpc.src
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-07-19 15:39:11 +0200
committerMicael Karlberg <[email protected]>2011-07-19 15:39:11 +0200
commitf203698b44d50744a7543c79c936b148efd9e7ca (patch)
tree4c79fb4d59f7ff5c3b175597bc0d4ba35373f30f /lib/snmp/src/compile/snmpc.src
parentd9f6226ed0d91c7f6339c63c65c0df63da89af24 (diff)
parentfc26533846df044af302e5f27363cb8025fa7151 (diff)
downloadotp-f203698b44d50744a7543c79c936b148efd9e7ca.tar.gz
otp-f203698b44d50744a7543c79c936b148efd9e7ca.tar.bz2
otp-f203698b44d50744a7543c79c936b148efd9e7ca.zip
[compiler] Added the option warnings_as_errors (for the SNMP MIB
compiler (escript) frontend, the option --wae is used) which specifies whether warnings should be treated as errors. Tuncer Ayaz. OTP-9437 Merge branch 'bmk/snmp/compiler/warnings_as_errors/OTP-9437' into bmk/snmp/snmp421_integration Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src lib/snmp/src/compile/Makefile
Diffstat (limited to 'lib/snmp/src/compile/snmpc.src')
-rw-r--r--lib/snmp/src/compile/snmpc.src14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src
index 5f9b154bfa..4e91ae9a03 100644
--- a/lib/snmp/src/compile/snmpc.src
+++ b/lib/snmp/src/compile/snmpc.src
@@ -50,7 +50,8 @@
%% The default verbosity (silence) will be filled in
%% during argument processing.
verbosity,
- warnings = false
+ warnings = false,
+ warnings_as_errors = false
}).
@@ -74,6 +75,7 @@
%% --version
%% --verbosity V
%% --warnings
+%% --wae
main(Args) when is_list(Args) ->
case (catch process_args(Args)) of
ok ->
@@ -156,7 +158,8 @@ mk_mib_options(#state{outdir = OutDir,
%% The default verbosity (silence) will be filled in
%% during argument processing.
verbosity = V,
- warnings = W}) ->
+ warnings = W,
+ warnings_as_errors = WAE}) ->
[{outdir, OutDir},
{db, DB},
{i, IDs},
@@ -178,7 +181,8 @@ mk_mib_options(#state{outdir = OutDir,
maybe_option(Imp, imports) ++
maybe_option(MI, module_identity) ++
maybe_option(MC, module_compliance) ++
- maybe_option(AC, agent_capabilities).
+ maybe_option(AC, agent_capabilities) ++
+ maybe_option(WE, warnings_as_errors).
maybe_option(true, Opt) -> [Opt];
maybe_option(_, _) -> [].
@@ -292,6 +296,8 @@ process_args(["--nd"|Args], State) ->
process_args(Args, State#state{no_defaults = true});
process_args(["--rrnac"|Args], State) ->
process_args(Args, State#state{relaxed_row_name_assigne_check = true});
+process_args(["--wae"|Args], State) ->
+ process_args(Args, State#state{warnings_as_errors = true});
process_args([MIB], State) ->
Ext = filename:extension(MIB),
if
@@ -371,6 +377,8 @@ usage() ->
"~n a warning. "
"~n By default it is not included, but if this option is "
"~n present it will be. "
+ "~n --wae - Warnings as errors. "
+ "~n Indicates that warnings shall be treated as errors. "
"~n "
"~n", []),
halt(1).