diff options
-rw-r--r-- | usr.bin/m4/main.c | 4 | ||||
-rw-r--r-- | usr.bin/m4/mdef.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index f0fdeca..1a0011d 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -361,7 +361,7 @@ macro() /* no bracks */ chrsave(EOS); - if (sp == STACKMAX) + if ((uintptr_t)sp == STACKMAX) errx(1, "internal stack overflow"); eval((const char **) mstack+fp+1, 2, CALTYP); @@ -460,7 +460,7 @@ macro() else { /* end of argument list */ chrsave(EOS); - if (sp == STACKMAX) + if ((uintptr_t)sp == STACKMAX) errx(1, "internal stack overflow"); eval((const char **) mstack+fp+1, sp-fp, diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h index 183f753..9536ced 100644 --- a/usr.bin/m4/mdef.h +++ b/usr.bin/m4/mdef.h @@ -171,7 +171,7 @@ struct input_file { */ #define pushf(x) \ do { \ - if (++sp == STACKMAX) \ + if ((uintptr_t)++sp == STACKMAX) \ enlarge_stack();\ mstack[sp].sfra = (x); \ sstack[sp] = 0; \ @@ -179,7 +179,7 @@ struct input_file { #define pushs(x) \ do { \ - if (++sp == STACKMAX) \ + if ((uintptr_t)++sp == STACKMAX) \ enlarge_stack();\ mstack[sp].sstr = (x); \ sstack[sp] = 1; \ @@ -187,7 +187,7 @@ struct input_file { #define pushs1(x) \ do { \ - if (++sp == STACKMAX) \ + if ((uintptr_t)++sp == STACKMAX) \ enlarge_stack();\ mstack[sp].sstr = (x); \ sstack[sp] = 0; \ |