aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/compile/snmpc_lib.hrl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-07-18 15:25:51 +0200
committerMicael Karlberg <[email protected]>2011-07-18 15:25:51 +0200
commitcac2257eeee2158fc0348913a7551fd947f40787 (patch)
treeb86bda17475f96b2fa53b1224171e00857f639ed /lib/snmp/src/compile/snmpc_lib.hrl
parent917ac0f91480757051b3644832e0bdbb5afd41b6 (diff)
downloadotp-cac2257eeee2158fc0348913a7551fd947f40787.tar.gz
otp-cac2257eeee2158fc0348913a7551fd947f40787.tar.bz2
otp-cac2257eeee2158fc0348913a7551fd947f40787.zip
[compiler] Added the option warnings_as_errors which
specifies whether warnings should be treated as errors. Tuncer Ayaz. OTP-9437
Diffstat (limited to 'lib/snmp/src/compile/snmpc_lib.hrl')
-rw-r--r--lib/snmp/src/compile/snmpc_lib.hrl15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/snmp/src/compile/snmpc_lib.hrl b/lib/snmp/src/compile/snmpc_lib.hrl
index 000486e728..35ec9abd03 100644
--- a/lib/snmp/src/compile/snmpc_lib.hrl
+++ b/lib/snmp/src/compile/snmpc_lib.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2011. 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
@@ -20,8 +20,17 @@
-ifndef(snmpc_lib).
-define(snmpc_lib, true).
--define(vwarning(F, A), ?verbosity(warning, F, A, ignore)).
--define(vwarning2(F, A, MibLine), ?verbosity(warning, F, A, MibLine)).
+-define(vwarning(F, A),
+ case get(warnings_as_errors) of
+ true -> snmpc_lib:error(F, A);
+ _ -> ?verbosity(warning, F, A, ignore)
+ end).
+
+-define(vwarning2(F, A, MibLine),
+ case get(warnings_as_errors) of
+ true -> snmpc_lib:error(F, A, MibLine);
+ _ -> ?verbosity(warning, F, A, MibLine)
+ end).
-define(vinfo(F, A), ?verbosity(info, F, A, ignore)).
-define(vinfo2(F, A, MibLine), ?verbosity(info, F, A, MibLine)).
-define(vlog(F, A), ?verbosity(log, F, A, ignore)).