summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-13 15:05:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-13 15:05:53 -0700
commit97b6d5b6769f7112b2d28648991e6ee9b57b4833 (patch)
treefdec9fe01852408f48d2081d63f3f301258e9964 /preproc.c
parentcdc69da37cdd30c33144e955f513542b5d96ef47 (diff)
downloadnasm-97b6d5b6769f7112b2d28648991e6ee9b57b4833.tar.gz
nasm-97b6d5b6769f7112b2d28648991e6ee9b57b4833.tar.bz2
nasm-97b6d5b6769f7112b2d28648991e6ee9b57b4833.zip
preproc.c: make %warning actually issue a warning...
The calculation of "severity" was buggered up, with the result that %warning actually issued an error.
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/preproc.c b/preproc.c
index c59c2f9..0455268 100644
--- a/preproc.c
+++ b/preproc.c
@@ -2276,8 +2276,9 @@ static int do_directive(Token * tline)
case PP_ERROR:
case PP_WARNING:
{
- int severity = PP_ERROR ? ERR_NONFATAL|ERR_NO_SEVERITY :
- ERR_WARNING|ERR_NO_SEVERITY;
+ int severity = (i == PP_ERROR)
+ ? ERR_NONFATAL|ERR_NO_SEVERITY
+ : ERR_WARNING|ERR_NO_SEVERITY;
tline->next = expand_smacro(tline->next);
tline = tline->next;