summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2010-06-20 01:52:19 +0400
committerCyrill Gorcunov <gorcunov@gmail.com>2010-06-20 01:52:19 +0400
commitefb358339d92548d97022585ee7f09eb29b95a88 (patch)
tree69417e0238c298c114fba3d0d9a0e95d65928649
parent2df23513b32f68f88e715667f29930348b3ade7c (diff)
downloadnasm-efb358339d92548d97022585ee7f09eb29b95a88.tar.gz
preproc.c: Get rid of signed/unsigned comparison warning
We need mac->nparam being explicictly int'fied otherwise compiler issue a warning. Note that we might have been using unsigned int but it would break an ability to pass negative indices. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--preproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/preproc.c b/preproc.c
index ca31fbc6..d54ee592 100644
--- a/preproc.c
+++ b/preproc.c
@@ -3621,8 +3621,8 @@ static Token *expand_mmac_params_range(MMacro *mac, Token *tline, Token ***last)
(lst > (int)mac->nparam || lst < (-(int)mac->nparam)))
goto err;
- fst = fst < 0 ? fst + mac->nparam + 1: fst;
- lst = lst < 0 ? lst + mac->nparam + 1: lst;
+ fst = fst < 0 ? fst + (int)mac->nparam + 1: fst;
+ lst = lst < 0 ? lst + (int)mac->nparam + 1: lst;
/* counted from zero */
fst--, lst--;