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.
This commit is contained in:
Juli Mallett 2002-06-20 11:14:54 +00:00
parent 0004e89d00
commit d40d348ceb
2 changed files with 5 additions and 5 deletions

View File

@ -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,

View File

@ -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; \