summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2011-12-05 01:01:06 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2011-12-05 01:01:06 +0400
commit0e754dcafea4d8d458928afb0cc786517244b3f8 (patch)
tree7c2f88285634f72537121efaded0d259347de6a1 /nasm.c
parentead8772590be3cdf87f1aedcc16492006114095d (diff)
downloadnasm-0e754dcafea4d8d458928afb0cc786517244b3f8.tar.gz
nasm-0e754dcafea4d8d458928afb0cc786517244b3f8.tar.bz2
nasm-0e754dcafea4d8d458928afb0cc786517244b3f8.zip
Add WARN_IDX helper and ERR_WARN_TERM named constant
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nasm.c b/nasm.c
index d744253..ed49a3e 100644
--- a/nasm.c
+++ b/nasm.c
@@ -1915,8 +1915,7 @@ static bool is_suppressed_warning(int severity)
/* Might be a warning but suppresed explicitly */
if (severity & ERR_WARN_MASK) {
- int index = (severity & ERR_WARN_MASK) >> ERR_WARN_SHR;
- if (warning_on[index])
+ if (warning_on[WARN_IDX(severity)])
return false;
}
@@ -1979,7 +1978,8 @@ static void nasm_verror_common(int severity, const char *fmt, va_list args)
/* no further action, by definition */
break;
case ERR_WARNING:
- if (warning_on[0]) /* Treat warnings as errors */
+ /* Treat warnings as errors */
+ if (warning_on[WARN_IDX(ERR_WARN_TERM)])
terminate_after_phase = true;
break;
case ERR_NONFATAL: