aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-09-05 11:28:46 +0200
committerMicael Karlberg <[email protected]>2011-09-05 11:28:46 +0200
commit67803978db45ac5ba9a23aa6ec2a5aaac396ec3d (patch)
tree4d1185f9eb4712d06950881627a0e3695cac2b60 /lib/snmp/src
parentaca631f40850fabbbc9c0d26b04c550d62b7f09e (diff)
downloadotp-67803978db45ac5ba9a23aa6ec2a5aaac396ec3d.tar.gz
otp-67803978db45ac5ba9a23aa6ec2a5aaac396ec3d.tar.bz2
otp-67803978db45ac5ba9a23aa6ec2a5aaac396ec3d.zip
Wrapper (e)script did not handle (new) option --Werror.
Also removed the "Error : " prefix for error printouts.
Diffstat (limited to 'lib/snmp/src')
-rw-r--r--lib/snmp/src/compile/snmpc.src4
-rw-r--r--lib/snmp/src/compile/snmpc_lib.erl4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src
index ee65129437..f993335b89 100644
--- a/lib/snmp/src/compile/snmpc.src
+++ b/lib/snmp/src/compile/snmpc.src
@@ -75,7 +75,7 @@
%% --version
%% --verbosity V
%% --warnings
-%% --wae | --warnings_as_errors
+%% --Werror | --wae | --warnings_as_errors
main(Args) when is_list(Args) ->
case (catch process_args(Args)) of
ok ->
@@ -298,6 +298,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_assign_check = true});
+process_args(["--Werror"|Args], State) ->
+ process_args(Args, State#state{warnings_as_errors = true});
process_args(["--wae"|Args], State) ->
process_args(Args, State#state{warnings_as_errors = true});
process_args(["--warnings_as_errors"|Args], State) ->
diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl
index 4f71c47bfa..a0a35e91c4 100644
--- a/lib/snmp/src/compile/snmpc_lib.erl
+++ b/lib/snmp/src/compile/snmpc_lib.erl
@@ -1754,12 +1754,12 @@ error(FormatStr, Data, Line) when is_list(FormatStr) ->
exit(error).
print_error(FormatStr, Data) when is_list(FormatStr) ->
- ok = io:format("~s: Error: " ++ FormatStr,[get(filename)|Data]),
+ ok = io:format("~s: " ++ FormatStr,[get(filename)|Data]),
put(errors,yes),
io:format("~n").
print_error(FormatStr, Data,Line) when is_list(FormatStr) ->
- ok = io:format("~s: ~w: Error: " ++ FormatStr,[get(filename), Line |Data]),
+ ok = io:format("~s: ~w: " ++ FormatStr,[get(filename), Line |Data]),
put(errors,yes),
io:format("~n").