From 9aec8f6722fe9043268e599ac57c7e5e5c3d822c Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 22 Jan 2010 06:37:19 +0000 Subject: [PATCH] fix warnings on 64 bits arch patch by Albin Tonerre, modified by me so that vc++ is happy SVN revision: 45428 --- legacy/embryo/src/bin/embryo_cc_sc.h | 8 +++++++- legacy/embryo/src/bin/embryo_cc_sc1.c | 1 - legacy/embryo/src/bin/embryo_cc_sc2.c | 4 ---- legacy/embryo/src/bin/embryo_cc_sc3.c | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/legacy/embryo/src/bin/embryo_cc_sc.h b/legacy/embryo/src/bin/embryo_cc_sc.h index ea4c9a6caf..e72e1bcfb1 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc.h +++ b/legacy/embryo/src/bin/embryo_cc_sc.h @@ -36,6 +36,12 @@ #include #include +#ifndef _MSC_VER +# include +#else +# include +#endif + #include "embryo_cc_amx.h" /* Note: the "cell" and "ucell" types are defined in AMX.H */ @@ -53,7 +59,7 @@ #define PREPROC_TERM '\x7f' /* termination character for preprocessor expressions (the "DEL" code) */ #define sDEF_PREFIX "default.inc" /* default prefix filename */ -typedef void *stkitem; /* type of items stored on the stack */ +typedef intptr_t stkitem; /* type of items stored on the stack */ typedef struct __s_arginfo { /* function argument info */ diff --git a/legacy/embryo/src/bin/embryo_cc_sc1.c b/legacy/embryo/src/bin/embryo_cc_sc1.c index 96760fb76c..a2d3a5da3b 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc1.c +++ b/legacy/embryo/src/bin/embryo_cc_sc1.c @@ -3443,7 +3443,6 @@ test(int label, int parens, int invert) #endif } /* if */ - /* FIXME: 64bit unsafe! putting an int on a stack of void *'s */ pushstk((stkitem) intest); intest = 1; if (parens) diff --git a/legacy/embryo/src/bin/embryo_cc_sc2.c b/legacy/embryo/src/bin/embryo_cc_sc2.c index de04fe0113..d58108e7da 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc2.c +++ b/legacy/embryo/src/bin/embryo_cc_sc2.c @@ -116,14 +116,10 @@ plungequalifiedfile(char *name) pushstk((stkitem) inpf); pushstk((stkitem) inpfname); /* pointer to current file name */ pushstk((stkitem) curlibrary); - /* FIXME: 64bit unsafe */ pushstk((stkitem) iflevel); assert(skiplevel == 0); - /* FIXME: 64bit unsafe */ pushstk((stkitem) icomment); - /* FIXME: 64bit unsafe */ pushstk((stkitem) fcurrent); - /* FIXME: 64bit unsafe */ pushstk((stkitem) fline); inpfname = strdup(name); /* set name of include file */ if (inpfname == NULL) diff --git a/legacy/embryo/src/bin/embryo_cc_sc3.c b/legacy/embryo/src/bin/embryo_cc_sc3.c index 95027843b9..59b774f276 100644 --- a/legacy/embryo/src/bin/embryo_cc_sc3.c +++ b/legacy/embryo/src/bin/embryo_cc_sc3.c @@ -1698,9 +1698,7 @@ primary(value * lval) if (matchtoken('(')) { /* sub-expression - (expression,...) */ - /* FIXME: 64bit unsafe */ pushstk((stkitem) intest); - /* FIXME: 64bit unsafe */ pushstk((stkitem) sc_allowtags); intest = 0; /* no longer in "test" expression */