From ee684289513efbb7b34a117dee3052df931300df Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Mon, 21 Dec 2009 17:56:40 +0000 Subject: [PATCH] Added parenthesis to avoid warning messages. --- ext/f2c_libs/lread.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ext/f2c_libs/lread.c b/ext/f2c_libs/lread.c index bf54a2e41..c23c0ad58 100644 --- a/ext/f2c_libs/lread.c +++ b/ext/f2c_libs/lread.c @@ -107,7 +107,7 @@ flag f__lquit; int f__lcount,f__ltype,nml_read; char *f__lchar; double f__lx,f__ly; -#define ERR(x) if(n=(x)) return(n) +#define ERR(x) if((n=(x))) return(n) #define GETC(x) (x=(*l_getc)()) #define Ungetc(x,y) (*l_ungetc)(x,y) @@ -292,11 +292,12 @@ l_C(Void) f__lquit = 2; return 0; } - if (rd_count(ch)) + if (rd_count(ch)) { if(!f__cf || !feof(f__cf)) errfl(f__elist->cierr,112,"complex format"); else err(f__elist->cierr,(EOF),"lread"); + } if(GETC(ch)!='*') { if(!f__cf || !feof(f__cf)) @@ -315,7 +316,7 @@ l_C(Void) Ungetc(ch,f__cf); nml_save = nml_read; nml_read = 0; - if (ch = l_R(1,0)) + if ((ch = l_R(1,0))) return ch; if (!f__ltype) errfl(f__elist->cierr,112,"no real part"); @@ -327,7 +328,7 @@ l_C(Void) } while(iswhit(GETC(ch))); (void) Ungetc(ch,f__cf); - if (ch = l_R(1,0)) + if ((ch = l_R(1,0))) return ch; if (!f__ltype) errfl(f__elist->cierr,112,"no imaginary part"); @@ -354,7 +355,7 @@ l_C(Void) nmL_getc(Void) { int rv; - if (rv = *nmL_next++) + if ((rv = *nmL_next++)) return rv; l_getc = nmL_getc_save; l_ungetc = nmL_ungetc_save; @@ -436,11 +437,12 @@ l_L(Void) if(isdigit(ch)) { rd_count(ch); - if(GETC(ch)!='*') + if(GETC(ch)!='*') { if(!f__cf || !feof(f__cf)) errfl(f__elist->cierr,112,"no star"); else err(f__elist->cierr,(EOF),"lread"); + } GETC(ch); } sawdot = 0; @@ -788,7 +790,7 @@ integer s_rsle(cilist *a) f__reading=1; f__external=1; f__formatted=1; - if(n=c_le(a)) return(n); + if((n=c_le(a))) return(n); f__lioproc = l_read; f__lquit = 0; f__lcount = 0;