summaryrefslogtreecommitdiffstats
path: root/usr.bin/m4
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-06-20 11:14:54 +0000
committerjmallett <jmallett@FreeBSD.org>2002-06-20 11:14:54 +0000
commit9942f1e160a307a5b9250adbd00590b49b8353aa (patch)
tree1ece6268f0a09a12e3580cb6d36a9f3eb5505206 /usr.bin/m4
parent62b4c3b75712b6ccb1a8bd1702d9a3bf9e3e979c (diff)
downloadFreeBSD-src-9942f1e160a307a5b9250adbd00590b49b8353aa.zip
FreeBSD-src-9942f1e160a307a5b9250adbd00590b49b8353aa.tar.gz
Cast sp to uintptr_t when doing a compare of it to STACKMAX which is a size_t.
This messes up some indentation in mdef.h for some macros.
Diffstat (limited to 'usr.bin/m4')
-rw-r--r--usr.bin/m4/main.c4
-rw-r--r--usr.bin/m4/mdef.h6
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; \
OpenPOWER on IntegriCloud