Fixed glsl-optimizer and fcpp warnings.

This commit is contained in:
bkaradzic
2013-03-20 21:44:17 -07:00
parent f3c22c5b9d
commit d465d7279e
8 changed files with 25 additions and 22 deletions

View File

@@ -40,7 +40,7 @@ INLINE FILE_LOCAL ReturnCode cppmain(struct Global *);
int fppPreProcess(struct fppTag *tags)
{
int i=0;
size_t i=0;
ReturnCode ret; /* cpp return code */
struct Global *global;

View File

@@ -314,7 +314,7 @@ ReturnCode textput(struct Global *global, char *text)
* Put the string in the parm[] buffer.
*/
int size;
size_t size;
size = strlen(text) + 1;
if ((global->parmp + size) >= &global->parm[NPARMWORK]) {
@@ -559,7 +559,7 @@ ReturnCode expstuff(struct Global *global,
int c; /* Current character */
char *inp; /* -> repl string */
char *defp; /* -> macro output buff */
int size; /* Actual parm. size */
size_t size; /* Actual parm. size */
char *defend; /* -> output buff end */
int string_magic; /* String formal hack */
FILEINFO *file; /* Funny #include */

10
3rdparty/fcpp/cpp6.c vendored
View File

@@ -488,7 +488,7 @@ char *savestring(struct Global *global, char *text)
}
ReturnCode getfile(struct Global *global,
int bufsize, /* Line or define buffer size */
size_t bufsize, /* Line or define buffer size */
char *name,
FILEINFO **file) /* File or macro name string */
{
@@ -496,7 +496,7 @@ ReturnCode getfile(struct Global *global,
* Common FILEINFO buffer initialization for a new file or macro.
*/
int size;
size_t size;
size = strlen(name); /* File/macro name */
@@ -583,12 +583,12 @@ DEFBUF *defendel(struct Global *global,
char *np;
int nhash;
int temp;
int size;
size_t size;
for (nhash = 0, np = name; *np != EOS;)
nhash += *np++;
size = (np - name);
nhash += size;
nhash += (int)size;
prevp = &global->symtab[nhash % SBSIZE];
while ((dp = *prevp) != (DEFBUF *) NULL) {
if (dp->hash == nhash
@@ -606,7 +606,7 @@ DEFBUF *defendel(struct Global *global,
prevp = &dp->link;
}
if (!delete) {
dp = (DEFBUF *) malloc((int) (sizeof (DEFBUF) + size));
dp = (DEFBUF *) malloc(sizeof (DEFBUF) + size);
dp->link = *prevp;
*prevp = dp;
dp->hash = nhash;

View File

@@ -398,7 +398,7 @@ void dumpstack(OPTAB[NEXP], register OPTAB *, int [NEXP], register int *);
void skipnl(struct Global *);
int skipws(struct Global *);
ReturnCode macroid(struct Global *, int *);
ReturnCode getfile(struct Global *, int, char *, FILEINFO **);
ReturnCode getfile(struct Global *, size_t, char *, FILEINFO **);
DEFBUF *lookid(struct Global *, int );
DEFBUF *defendel(struct Global *, char *, int);
#if DEBUG