Nr 2/5 (x = ...) != '\0' , swallow warnings

This commit is contained in:
rlar 2010-11-19 18:49:05 +00:00
parent acb1c33d66
commit 6256f69499
5 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2010-11-19 Robert Larice
* src/ngmultidec.c ,
* src/frontend/inpcom.c ,
* src/frontend/quote.c ,
* src/misc/string.c :
Nr 2/5 (x = ...) != '\0' , swallow warnings
2010-11-19 Robert Larice
* src/frontend/plotting/clip.c :
Nr 1/5 (x = ...) == 0 , swallow warnings

View File

@ -1539,7 +1539,7 @@ inp_readall(FILE *fp, struct line **data, int call_depth, char *dir_name, bool c
inp_stripcomments_deck(working);
while (working) {
for (s = working->li_line; (c = *s) && c <= ' '; s++)
for (s = working->li_line; (c = *s) != '\0' && c <= ' '; s++)
;
#ifdef TRACE

View File

@ -23,7 +23,7 @@ cp_wstrip(char *str)
char c, d;
if (str)
while ((c = *str)) { /* assign and test */
while ((c = *str) != '\0') { /* assign and test */
d = (char) strip(c);
if (c != d)
*str = d;

View File

@ -232,7 +232,7 @@ gettok(char **s)
if (!**s)
return (NULL);
spice_dstring_init(&buf) ;
while ((c = **s) && !isspace(c)) {
while ((c = **s) != '\0' && !isspace(c)) {
if (c == '('/*)*/)
paren += 1;
else if (c == /*(*/')')
@ -311,7 +311,7 @@ gettok_noparens(char **s)
return (NULL); /* return NULL if we come to end of line */
spice_dstring_init(&buf) ;
while ((c = **s) &&
while ((c = **s) != '\0' &&
!isspace(c) &&
( **s != '(' ) &&
( **s != ')' ) &&
@ -343,7 +343,7 @@ gettok_instance(char **s)
return (NULL); /* return NULL if we come to end of line */
spice_dstring_init(&buf) ;
while ((c = **s) &&
while ((c = **s) != '\0' &&
!isspace(c) &&
( **s != '(' ) &&
( **s != ')' )
@ -384,7 +384,7 @@ gettok_node(char **s)
return (NULL); /* return NULL if we come to end of line */
spice_dstring_init(&buf) ;
while ((c = **s) &&
while ((c = **s) != '\0' &&
!isspace(c) &&
( **s != '(' ) &&
( **s != ')' ) &&

View File

@ -46,7 +46,7 @@ main (int argc, char **argv)
while (argc > 0) {
s = *argv++;
argc--;
while ((ch = *s++)) {
while ((ch = *s++) != '\0') {
if (*s)
optarg = s;
else if (argc)