Modifications to beat down the compiler warnings. Merged from the

liquidTransportDevelop
This commit is contained in:
Harry Moffat
2009-12-29 03:01:18 +00:00
parent 5eb5371cbc
commit 35f32314b9
8 changed files with 55 additions and 38 deletions

View File

@@ -1,8 +1,8 @@
#
# $Source: /cvsroot/cantera/cantera/ext/f2c_libs/Makefile.in,v $
# $Author: dggoodwin $
# $Revision: 1.13 $
# $Date: 2008/02/05 23:36:13 $
# $Author$
# $Revision$
# $Date$
#
# Unix makefile: see README.
# For C++, first "make hadd".

View File

@@ -101,7 +101,7 @@ integer s_rdfe(cilist *a)
int n;
if(!f__init) f_init();
f__reading=1;
if(n=c_dfe(a))return(n);
if((n=c_dfe(a))) return(n);
if(f__curunit->uwrt && f__nowreading(f__curunit))
err(a->cierr,errno,"read start");
f__getn = y_getc;
@@ -123,7 +123,7 @@ integer s_wdfe(cilist *a)
int n;
if(!f__init) f_init();
f__reading=0;
if(n=c_dfe(a)) return(n);
if((n=c_dfe(a))) return(n);
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
err(a->cierr,errno,"startwrt");
f__putn = x_putc;

View File

@@ -37,7 +37,7 @@ integer s_rdue(cilist *a)
{
int n;
f__reading=1;
if(n=c_due(a)) return(n);
if((n=c_due(a))) return(n);
if(f__curunit->uwrt && f__nowreading(f__curunit))
err(a->cierr,errno,"read start");
return(0);
@@ -50,7 +50,7 @@ integer s_wdue(cilist *a)
{
int n;
f__reading=0;
if(n=c_due(a)) return(n);
if((n=c_due(a))) return(n);
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
err(a->cierr,errno,"write start");
return(0);

View File

@@ -43,7 +43,7 @@ integer f_end(alist *a)
if(b->ufd==NULL) {
char nbuf[10];
sprintf(nbuf,"fort.%ld",(long)a->aunit);
if (tf = FOPEN(nbuf, f__w_mode[0]))
if ((tf = FOPEN(nbuf, f__w_mode[0])))
fclose(tf);
return(0);
}

View File

@@ -88,7 +88,7 @@ integer s_rsfi(a) icilist *a;
integer s_rsfi(icilist *a)
#endif
{ int n;
if(n=c_si(a)) return(n);
if((n=c_si(a))) return(n);
f__reading=1;
f__doed=rd_ed;
f__doned=rd_ned;
@@ -120,7 +120,7 @@ integer s_wsfi(a) icilist *a;
integer s_wsfi(icilist *a)
#endif
{ int n;
if(n=c_si(a)) return(n);
if((n=c_si(a))) return(n);
f__reading=0;
f__doed=w_ed;
f__doned=w_ned;

View File

@@ -63,55 +63,70 @@ integer f_inqu(inlist *a)
p=NULL;
}
}
if(a->inex!=NULL)
if(byfile && x != -1 || !byfile && p!=NULL)
*a->inex=1;
else *a->inex=0;
if(a->inopen!=NULL)
if(a->inex!=NULL) {
if((byfile && x != -1) || (!byfile && p!=NULL)) {
*a->inex=1;
} else {
*a->inex=0;
}
}
if(a->inopen!=NULL) {
if(byfile) *a->inopen=(p!=NULL);
else *a->inopen=(p!=NULL && p->ufd!=NULL);
}
if(a->innum!=NULL) *a->innum= p-f__units;
if(a->innamed!=NULL)
if(byfile || p!=NULL && p->ufnm!=NULL)
if(a->innamed!=NULL) {
if(byfile || (p!=NULL && p->ufnm!=NULL))
*a->innamed=1;
else *a->innamed=0;
if(a->inname!=NULL)
}
if(a->inname!=NULL) {
if(byfile)
b_char(buf,a->inname,a->innamlen);
else if(p!=NULL && p->ufnm!=NULL)
b_char(p->ufnm,a->inname,a->innamlen);
if(a->inacc!=NULL && p!=NULL && p->ufd!=NULL)
}
if(a->inacc!=NULL && p!=NULL && p->ufd!=NULL) {
if(p->url)
b_char("DIRECT",a->inacc,a->inacclen);
else b_char("SEQUENTIAL",a->inacc,a->inacclen);
if(a->inseq!=NULL)
}
if(a->inseq!=NULL) {
if(p!=NULL && p->url)
b_char("NO",a->inseq,a->inseqlen);
else b_char("YES",a->inseq,a->inseqlen);
if(a->indir!=NULL)
}
if(a->indir!=NULL) {
if(p==NULL || p->url)
b_char("YES",a->indir,a->indirlen);
else b_char("NO",a->indir,a->indirlen);
if(a->infmt!=NULL)
}
if(a->infmt!=NULL) {
if(p!=NULL && p->ufmt==0)
b_char("UNFORMATTED",a->infmt,a->infmtlen);
else b_char("FORMATTED",a->infmt,a->infmtlen);
if(a->inform!=NULL)
}
if(a->inform!=NULL) {
if(p!=NULL && p->ufmt==0)
b_char("NO",a->inform,a->informlen);
else b_char("YES",a->inform,a->informlen);
if(a->inunf)
}
if(a->inunf) {
if(p!=NULL && p->ufmt==0)
b_char("YES",a->inunf,a->inunflen);
else if (p!=NULL) b_char("NO",a->inunf,a->inunflen);
else b_char("UNKNOWN",a->inunf,a->inunflen);
else {
if (p!=NULL) b_char("NO",a->inunf,a->inunflen);
else b_char("UNKNOWN",a->inunf,a->inunflen);
}
}
if(a->inrecl!=NULL && p!=NULL)
*a->inrecl=p->url;
if(a->innrec!=NULL && p!=NULL && p->url>0)
*a->innrec=(ftnint)(FTELL(p->ufd)/p->url+1);
if(a->inblank && p!=NULL && p->ufmt)
if(a->inblank && p!=NULL && p->ufmt) {
if(p->ublnk)
b_char("ZERO",a->inblank,a->inblanklen);
else b_char("NULL",a->inblank,a->inblanklen);
}
return(0);
}

View File

@@ -44,11 +44,11 @@ lbit_cshift(integer a, integer b, integer len)
full_len:
if (b >= 0) {
b %= LONGBITS;
return (integer)(x << b | x >> LONGBITS -b );
return (integer)(x << b | x >> (LONGBITS -b) );
}
b = -b;
b %= LONGBITS;
return (integer)(x << LONGBITS - b | x >> b);
return (integer)(x << (LONGBITS - b) | x >> b);
}
y = z = (unsigned long)-1;
y <<= len;
@@ -57,11 +57,11 @@ lbit_cshift(integer a, integer b, integer len)
x &= z;
if (b >= 0) {
b %= len;
return (integer)(y | z & (x << b | x >> len - b));
return (integer)((y) | (z & (x << b | x >> (len - b))));
}
b = -b;
b %= len;
return (integer)(y | z & (x >> b | x << len - b));
return (integer)((y) | (z & (x >> b | x << (len - b))));
}
#ifdef __cplusplus
}

View File

@@ -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;