Resolve many build warnings
This patch fixes many warnings from the beginning of the build up to and including the depend stage. Nearly all warnings should be gone even with -Wall.
This commit is contained in:
committed by
Jon Trulson
parent
2bf29e5d63
commit
42e891d9e7
@@ -45,6 +45,10 @@ in this Software without prior written authorization from The Open Group.
|
||||
|
||||
#include "def.h"
|
||||
|
||||
static int deftype();
|
||||
static int zero_value();
|
||||
static int merge2defines();
|
||||
|
||||
extern char *directives[];
|
||||
extern struct inclist maininclist;
|
||||
|
||||
@@ -56,7 +60,7 @@ gobble(filep, file, file_red)
|
||||
register char *line;
|
||||
register int type;
|
||||
|
||||
while (line = our_getline(filep)) {
|
||||
while ((line = our_getline(filep))) {
|
||||
switch(type = deftype(line, filep, file_red, file, FALSE)) {
|
||||
case IF:
|
||||
case IFFALSE:
|
||||
@@ -189,7 +193,7 @@ int deftype (line, filep, file_red, file, parse_it)
|
||||
/*
|
||||
* separate the name of a single symbol.
|
||||
*/
|
||||
while (isalnum(*p) || *p == '_')
|
||||
while (isalnum((int)*p) || *p == '_')
|
||||
*line++ = *p++;
|
||||
*line = '\0';
|
||||
break;
|
||||
@@ -265,7 +269,7 @@ struct symtab **fdefined(symbol, file, srcfile)
|
||||
if (file->i_flags & DEFCHECKED)
|
||||
return(NULL);
|
||||
file->i_flags |= DEFCHECKED;
|
||||
if (val = slookup(symbol, file))
|
||||
if ((val = slookup(symbol, file)))
|
||||
debug(1,("%s defined in %s as %s\n",
|
||||
symbol, file->i_file, (*val)->s_value));
|
||||
if (val == NULL && file->i_list)
|
||||
@@ -294,12 +298,12 @@ struct symtab **isdefined(symbol, file, srcfile)
|
||||
{
|
||||
register struct symtab **val;
|
||||
|
||||
if (val = slookup(symbol, &maininclist)) {
|
||||
if ((val = slookup(symbol, &maininclist))) {
|
||||
debug(1,("%s defined on command line\n", symbol));
|
||||
if (srcfile != NULL) *srcfile = &maininclist;
|
||||
return(val);
|
||||
}
|
||||
if (val = fdefined(symbol, file, srcfile))
|
||||
if ((val = fdefined(symbol, file, srcfile)))
|
||||
return(val);
|
||||
debug(1,("%s not defined in %s\n", symbol, file->i_file));
|
||||
return(NULL);
|
||||
@@ -314,7 +318,7 @@ zero_value(exp, filep, file_red)
|
||||
register struct filepointer *filep;
|
||||
register struct inclist *file_red;
|
||||
{
|
||||
if (cppsetup(exp, filep, file_red))
|
||||
if ((cppsetup(exp, filep, file_red)))
|
||||
return(IFFALSE);
|
||||
else
|
||||
return(IF);
|
||||
@@ -413,7 +417,7 @@ define(def, file)
|
||||
|
||||
/* Separate symbol name and its value */
|
||||
val = def;
|
||||
while (isalnum(*val) || *val == '_')
|
||||
while (isalnum((int)*val) || *val == '_')
|
||||
val++;
|
||||
if (*val)
|
||||
*val++ = '\0';
|
||||
@@ -549,7 +553,7 @@ find_includes(filep, file, file_red, recursion, failOK)
|
||||
register int type;
|
||||
boolean recfailOK;
|
||||
|
||||
while (line = our_getline(filep)) {
|
||||
while ((line = our_getline(filep))) {
|
||||
switch(type = deftype(line, filep, file_red, file, TRUE)) {
|
||||
case IF:
|
||||
doif:
|
||||
|
||||
Reference in New Issue
Block a user