Avoid some compiler warnings

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@17065 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2003-06-29 14:58:41 +00:00
parent 6c86d3d7bb
commit a6cac8fb4a
2 changed files with 17 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2003-06-29 Richard Frith-Macdonald <rfm@gnu.org>
* user_home.c: Cast all arguments to isspace() as int ... for picky
compiler versions.
2003-06-25 Adam Fedor <fedor@gnu.org>
* Documentation/GNUmakefile.in (after-install): Install man pages

View file

@ -192,7 +192,7 @@ int main (int argc, char** argv)
for (i = 0; i < len0; i++)
{
if (isspace(buf0[0]))
if (isspace((int)buf0[0]))
{
len0 = 0; /* Spaces not permitted! */
}
@ -275,20 +275,20 @@ int main (int argc, char** argv)
{
val = pos;
*val++ = '\0';
while (isspace(*key))
while (isspace((int)*key))
key++;
while (strlen(key) > 0 && isspace(key[strlen(key)-1]))
while (strlen(key) > 0 && isspace((int)key[strlen(key)-1]))
key[strlen(key)-1] = '\0';
while (isspace(*val))
val++;
while (strlen(val) > 0 && isspace(val[strlen(val)-1]))
while (strlen(val) > 0 && isspace((int)val[strlen(val)-1]))
val[strlen(val)-1] = '\0';
}
else
{
while (isspace(*key))
while (isspace((int)*key))
key++;
while (strlen(key) > 0 && isspace(key[strlen(key)-1]))
while (strlen(key) > 0 && isspace((int)key[strlen(key)-1]))
key[strlen(key)-1] = '\0';
val = "";
}
@ -351,13 +351,15 @@ int main (int argc, char** argv)
char *val = pos;
*val++ = '\0';
while (isspace(*key))
while (isspace((int)*key))
key++;
while (strlen(key) > 0 && isspace(key[strlen(key)-1]))
while (strlen(key) > 0
&& isspace((int)key[strlen(key)-1]))
key[strlen(key)-1] = '\0';
while (isspace(*val))
while (isspace((int)*val))
val++;
while (strlen(val) > 0 && isspace(val[strlen(val)-1]))
while (strlen(val) > 0
&& isspace((int)val[strlen(val)-1]))
val[strlen(val)-1] = '\0';
if (strcmp(key, "GNUSTEP_USER_ROOT") == 0)