diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-12-05 01:01:06 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-12-05 01:01:06 +0400 |
commit | 0e754dcafea4d8d458928afb0cc786517244b3f8 (patch) | |
tree | 7c2f88285634f72537121efaded0d259347de6a1 /nasm.c | |
parent | ead8772590be3cdf87f1aedcc16492006114095d (diff) | |
download | nasm-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |