From e960f715b73aa82e6fa61a6edf8a6ff7d431adbb Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 17 Jan 2012 04:09:58 +0000 Subject: [PATCH] Fixed a bunch of compiler warnings (MSVC) in the f2c code --- ext/f2c_blas/isamax.c | 8 ++++---- ext/f2c_lapack/dlasq2.c | 14 +++++++------- ext/f2c_lapack/dlasq3.c | 8 ++++---- ext/f2c_lapack/dlasq5.c | 12 ++++++------ ext/f2c_lapack/dlasq6.c | 6 +++--- ext/f2c_libs/c_cos.c | 4 ++-- ext/f2c_libs/c_div.c | 6 +++--- ext/f2c_libs/c_exp.c | 4 ++-- ext/f2c_libs/c_log.c | 4 ++-- ext/f2c_libs/c_sin.c | 4 ++-- ext/f2c_libs/c_sqrt.c | 9 +++++---- ext/f2c_libs/dtime_.c | 2 +- ext/f2c_libs/etime_.c | 2 +- ext/f2c_libs/fmtlib.c | 2 +- ext/f2c_libs/inquire.c | 2 +- ext/f2c_libs/lread.c | 8 ++++---- ext/f2c_libs/lwrite.c | 2 +- ext/f2c_libs/open.c | 2 +- ext/f2c_libs/pow_ci.c | 4 ++-- ext/f2c_libs/rdfmt.c | 8 ++++---- ext/f2c_libs/wref.c | 2 +- ext/f2c_libs/wrtfmt.c | 2 +- ext/f2c_math/ddaspk.c | 6 +++--- ext/f2c_math/j4save.c | 2 +- ext/f2c_math/polfit.c | 12 ++++++------ ext/f2c_math/pvalue.c | 4 ++-- ext/f2c_math/xersve.c | 12 ++++++------ 27 files changed, 76 insertions(+), 75 deletions(-) diff --git a/ext/f2c_blas/isamax.c b/ext/f2c_blas/isamax.c index b5113adf0..2d3400b30 100644 --- a/ext/f2c_blas/isamax.c +++ b/ext/f2c_blas/isamax.c @@ -51,7 +51,7 @@ integer isamax_(integer *n, real *sx, integer *incx) /* code for increment not equal to 1 */ ix = 1; - smax = dabs(sx[1]); + smax = (real) dabs(sx[1]); ix += *incx; i__1 = *n; for (i__ = 2; i__ <= i__1; ++i__) { @@ -59,7 +59,7 @@ integer isamax_(integer *n, real *sx, integer *incx) goto L5; } ret_val = i__; - smax = (r__1 = sx[ix], dabs(r__1)); + smax = (real) (r__1 = sx[ix], dabs(r__1)); L5: ix += *incx; /* L10: */ @@ -69,14 +69,14 @@ L5: /* code for increment equal to 1 */ L20: - smax = dabs(sx[1]); + smax = (real) dabs(sx[1]); i__1 = *n; for (i__ = 2; i__ <= i__1; ++i__) { if ((r__1 = sx[i__], dabs(r__1)) <= smax) { goto L30; } ret_val = i__; - smax = (r__1 = sx[i__], dabs(r__1)); + smax = (real) (r__1 = sx[i__], dabs(r__1)); L30: ; } diff --git a/ext/f2c_lapack/dlasq2.c b/ext/f2c_lapack/dlasq2.c index f3a47a875..f939bdfb4 100644 --- a/ext/f2c_lapack/dlasq2.c +++ b/ext/f2c_lapack/dlasq2.c @@ -187,7 +187,7 @@ static integer c__11 = 11; d__ = 0.; e = 0.; - i__1 = *n - 1 << 1; + i__1 = (*n - 1) << 1; for (k = 1; k <= i__1; k += 2) { if (z__[k] < 0.) { *info = -(k + 200); @@ -266,8 +266,8 @@ static integer c__11 = 11; /* Reverse the qd-array, if warranted. */ if (z__[(i0 << 2) - 3] * 1.5 < z__[(n0 << 2) - 3]) { - ipn4 = i0 + n0 << 2; - i__1 = i0 + n0 - 1 << 1; + ipn4 = (i0 + n0) << 2; + i__1 = (i0 + n0 - 1) << 1; for (i4 = i0 << 2; i4 <= i__1; i4 += 4) { temp = z__[i4 - 3]; z__[i4 - 3] = z__[ipn4 - i4 - 3]; @@ -287,7 +287,7 @@ static integer c__11 = 11; d__ = z__[(n0 << 2) + pp - 3]; i__1 = (i0 << 2) + pp; - for (i4 = (n0 - 1 << 2) + pp; i4 >= i__1; i4 += -4) { + for (i4 = ((n0 - 1) << 2) + pp; i4 >= i__1; i4 += -4) { if (z__[i4 - 1] <= tol2 * d__) { z__[i4 - 1] = 0.; d__ = z__[i4 - 3]; @@ -301,7 +301,7 @@ static integer c__11 = 11; emin = z__[(i0 << 2) + pp + 1]; d__ = z__[(i0 << 2) + pp - 3]; - i__1 = (n0 - 1 << 2) + pp; + i__1 = ((n0 - 1) << 2) + pp; for (i4 = (i0 << 2) + pp; i4 <= i__1; i4 += 4) { z__[i4 - (pp << 1) - 2] = d__ + z__[i4 - 1]; if (z__[i4 - 1] <= tol2 * d__) { @@ -345,7 +345,7 @@ static integer c__11 = 11; iter = 2; nfail = 0; - ndiv = n0 - i0 << 1; + ndiv = (n0 - i0) << 1; i__1 = *n + 1; for (iwhila = 1; iwhila <= i__1; ++iwhila) { @@ -442,7 +442,7 @@ L100: qmax = z__[(i0 << 2) - 3]; emin = z__[(i0 << 2) - 1]; oldemn = z__[i0 * 4]; - i__3 = n0 - 3 << 2; + i__3 = (n0 - 3) << 2; for (i4 = i0 << 2; i4 <= i__3; i4 += 4) { if (z__[i4] <= tol2 * z__[i4 - 3] || z__[i4 - 1] <= tol2 * sigma) { diff --git a/ext/f2c_lapack/dlasq3.c b/ext/f2c_lapack/dlasq3.c index bd4cf32df..a1934a9b5 100644 --- a/ext/f2c_lapack/dlasq3.c +++ b/ext/f2c_lapack/dlasq3.c @@ -177,8 +177,8 @@ L50: if (*dmin__ <= 0. || *n0 < n0in) { if (z__[(*i0 << 2) + *pp - 3] * 1.5 < z__[(*n0 << 2) + *pp - 3]) { - ipn4 = *i0 + *n0 << 2; - i__1 = *i0 + *n0 - 1 << 1; + ipn4 = (*i0 + *n0) << 2; + i__1 = (*i0 + *n0 - 1) << 1; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { temp = z__[j4 - 3]; z__[j4 - 3] = z__[ipn4 - j4 - 3]; @@ -247,12 +247,12 @@ L80: goto L100; - } else if (*dmin__ < 0. && dmin1 > 0. && z__[(*n0 - 1 << 2) - *pp] < + } else if (*dmin__ < 0. && dmin1 > 0. && z__[((*n0 - 1) << 2) - *pp] < tol * (*sigma + dn1) && abs(dn) < tol * *sigma) { /* Convergence hidden by negative DN. */ - z__[(*n0 - 1 << 2) - *pp + 2] = 0.; + z__[((*n0 - 1) << 2) - *pp + 2] = 0.; *dmin__ = 0.; goto L100; } else if (*dmin__ < 0.) { diff --git a/ext/f2c_lapack/dlasq5.c b/ext/f2c_lapack/dlasq5.c index 835530b20..439e49036 100644 --- a/ext/f2c_lapack/dlasq5.c +++ b/ext/f2c_lapack/dlasq5.c @@ -90,7 +90,7 @@ extern "C" { /* Code for IEEE arithmetic. */ if (*pp == 0) { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 2] = d__ + z__[j4 - 1]; temp = z__[j4 + 1] / z__[j4 - 2]; @@ -103,7 +103,7 @@ extern "C" { /* L10: */ } } else { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 3] = d__ + z__[j4]; temp = z__[j4 + 2] / z__[j4 - 3]; @@ -121,7 +121,7 @@ extern "C" { *dnm2 = d__; *dmin2 = *dmin__; - j4 = (*n0 - 2 << 2) - *pp; + j4 = ((*n0 - 2) << 2) - *pp; j4p2 = j4 + (*pp << 1) - 1; z__[j4 - 2] = *dnm2 + z__[j4p2]; z__[j4] = z__[j4p2 + 2] * (z__[j4p2] / z__[j4 - 2]); @@ -141,7 +141,7 @@ extern "C" { /* Code for non IEEE arithmetic. */ if (*pp == 0) { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 2] = d__ + z__[j4 - 1]; if (d__ < 0.) { @@ -157,7 +157,7 @@ extern "C" { /* L30: */ } } else { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 3] = d__ + z__[j4]; if (d__ < 0.) { @@ -178,7 +178,7 @@ extern "C" { *dnm2 = d__; *dmin2 = *dmin__; - j4 = (*n0 - 2 << 2) - *pp; + j4 = ((*n0 - 2) << 2) - *pp; j4p2 = j4 + (*pp << 1) - 1; z__[j4 - 2] = *dnm2 + z__[j4p2]; if (*dnm2 < 0.) { diff --git a/ext/f2c_lapack/dlasq6.c b/ext/f2c_lapack/dlasq6.c index 4a6cbb793..57b802c37 100644 --- a/ext/f2c_lapack/dlasq6.c +++ b/ext/f2c_lapack/dlasq6.c @@ -89,7 +89,7 @@ extern "C" { *dmin__ = d__; if (*pp == 0) { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 2] = d__ + z__[j4 - 1]; if (z__[j4 - 2] == 0.) { @@ -113,7 +113,7 @@ extern "C" { /* L10: */ } } else { - i__1 = *n0 - 3 << 2; + i__1 = (*n0 - 3) << 2; for (j4 = *i0 << 2; j4 <= i__1; j4 += 4) { z__[j4 - 3] = d__ + z__[j4]; if (z__[j4 - 3] == 0.) { @@ -142,7 +142,7 @@ extern "C" { *dnm2 = d__; *dmin2 = *dmin__; - j4 = (*n0 - 2 << 2) - *pp; + j4 = ((*n0 - 2) << 2) - *pp; j4p2 = j4 + (*pp << 1) - 1; z__[j4 - 2] = *dnm2 + z__[j4p2]; if (z__[j4 - 2] == 0.) { diff --git a/ext/f2c_libs/c_cos.c b/ext/f2c_libs/c_cos.c index 29fe49e3c..ceb873d5d 100644 --- a/ext/f2c_libs/c_cos.c +++ b/ext/f2c_libs/c_cos.c @@ -15,8 +15,8 @@ void c_cos(complex *r, complex *z) #endif { double zi = z->i, zr = z->r; - r->r = cos(zr) * cosh(zi); - r->i = - sin(zr) * sinh(zi); + r->r = (real) (cos(zr) * cosh(zi)); + r->i = (real) (- sin(zr) * sinh(zi)); } #ifdef __cplusplus } diff --git a/ext/f2c_libs/c_div.c b/ext/f2c_libs/c_div.c index 59425e7aa..db8aa38c1 100644 --- a/ext/f2c_libs/c_div.c +++ b/ext/f2c_libs/c_div.c @@ -36,7 +36,7 @@ void c_div(complex *c, complex *a, complex *b) ratio = (double)b->r / b->i ; den = b->i * (1 + ratio*ratio); cr = (a->r*ratio + a->i) / den; - c->i = (a->i*ratio - a->r) / den; + c->i = (real) ((a->i*ratio - a->r) / den); } else @@ -44,9 +44,9 @@ void c_div(complex *c, complex *a, complex *b) ratio = (double)b->i / b->r ; den = b->r * (1 + ratio*ratio); cr = (a->r + a->i*ratio) / den; - c->i = (a->i - a->r*ratio) / den; + c->i = (real) ((a->i - a->r*ratio) / den); } - c->r = cr; + c->r = (real) cr; } #ifdef __cplusplus } diff --git a/ext/f2c_libs/c_exp.c b/ext/f2c_libs/c_exp.c index f46508d35..bfc1b1a30 100644 --- a/ext/f2c_libs/c_exp.c +++ b/ext/f2c_libs/c_exp.c @@ -17,8 +17,8 @@ void c_exp(complex *r, complex *z) double expx, zi = z->i; expx = exp(z->r); - r->r = expx * cos(zi); - r->i = expx * sin(zi); + r->r = (real) (expx * cos(zi)); + r->i = (real) (expx * sin(zi)); } #ifdef __cplusplus } diff --git a/ext/f2c_libs/c_log.c b/ext/f2c_libs/c_log.c index a0ba3f0d8..c8eec926e 100644 --- a/ext/f2c_libs/c_log.c +++ b/ext/f2c_libs/c_log.c @@ -15,8 +15,8 @@ void c_log(complex *r, complex *z) #endif { double zi, zr; - r->i = atan2(zi = z->i, zr = z->r); - r->r = log( f__cabs(zr, zi) ); + r->i = (real) atan2(zi = z->i, zr = z->r); + r->r = (real) log( f__cabs(zr, zi) ); } #ifdef __cplusplus } diff --git a/ext/f2c_libs/c_sin.c b/ext/f2c_libs/c_sin.c index c8bc30f2d..b55fcb5dd 100644 --- a/ext/f2c_libs/c_sin.c +++ b/ext/f2c_libs/c_sin.c @@ -15,8 +15,8 @@ void c_sin(complex *r, complex *z) #endif { double zi = z->i, zr = z->r; - r->r = sin(zr) * cosh(zi); - r->i = cos(zr) * sinh(zi); + r->r = (real) (sin(zr) * cosh(zi)); + r->i = (real) (cos(zr) * sinh(zi)); } #ifdef __cplusplus } diff --git a/ext/f2c_libs/c_sqrt.c b/ext/f2c_libs/c_sqrt.c index 1678c534d..714743580 100644 --- a/ext/f2c_libs/c_sqrt.c +++ b/ext/f2c_libs/c_sqrt.c @@ -22,18 +22,19 @@ void c_sqrt(complex *r, complex *z) r->r = r->i = 0.; else if(zr > 0) { - r->r = t = sqrt(0.5 * (mag + zr) ); + t = sqrt(0.5 * (mag + zr) ); + r->r = (real) t; t = zi / t; - r->i = 0.5 * t; + r->i = (real) (0.5 * t); } else { t = sqrt(0.5 * (mag - zr) ); if(zi < 0) t = -t; - r->i = t; + r->i = (real) t; t = zi / t; - r->r = 0.5 * t; + r->r = (real) (0.5 * t); } } #ifdef __cplusplus diff --git a/ext/f2c_libs/dtime_.c b/ext/f2c_libs/dtime_.c index 6a09b3e98..f7694247b 100644 --- a/ext/f2c_libs/dtime_.c +++ b/ext/f2c_libs/dtime_.c @@ -44,7 +44,7 @@ dtime_(float *tarray) static double t0; double t = clock(); tarray[1] = 0; - tarray[0] = (t - t0) / CLOCKS_PER_SECOND; + tarray[0] = (float) ((t - t0) / CLOCKS_PER_SECOND); t0 = t; return tarray[0]; #else diff --git a/ext/f2c_libs/etime_.c b/ext/f2c_libs/etime_.c index 2d9a36d8a..c6a1f108e 100644 --- a/ext/f2c_libs/etime_.c +++ b/ext/f2c_libs/etime_.c @@ -43,7 +43,7 @@ etime_(float *tarray) #endif double t = clock(); tarray[1] = 0; - return tarray[0] = t / CLOCKS_PER_SECOND; + return (float) (tarray[0] = t / CLOCKS_PER_SECOND); #else struct tms t; diff --git a/ext/f2c_libs/fmtlib.c b/ext/f2c_libs/fmtlib.c index 279f66f43..acbfbc37f 100644 --- a/ext/f2c_libs/fmtlib.c +++ b/ext/f2c_libs/fmtlib.c @@ -39,7 +39,7 @@ char *f__icvt(longint value, int *ndigit, int *sign, int base) } i = MAXINTLENGTH; do { - buf[--i] = (uvalue%base) + '0'; + buf[--i] = (char) ((uvalue%base) + '0'); uvalue /= base; } while(uvalue > 0); diff --git a/ext/f2c_libs/inquire.c b/ext/f2c_libs/inquire.c index 033e9c019..96db855eb 100644 --- a/ext/f2c_libs/inquire.c +++ b/ext/f2c_libs/inquire.c @@ -74,7 +74,7 @@ integer f_inqu(inlist *a) 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->innum!=NULL) *a->innum= (ftnint) (p-f__units); if(a->innamed!=NULL) { if(byfile || (p!=NULL && p->ufnm!=NULL)) *a->innamed=1; diff --git a/ext/f2c_libs/lread.c b/ext/f2c_libs/lread.c index c23c0ad58..c9e1598c0 100644 --- a/ext/f2c_libs/lread.c +++ b/ext/f2c_libs/lread.c @@ -181,7 +181,7 @@ retry: GETC(ch); } } - havenum += sp - sp1; + havenum += (int) (sp - sp1); se = 0; if (issign(ch)) goto signonly; @@ -751,15 +751,15 @@ l_read(ftnint *number, char *ptr, ftnlen len, ftnint type) break; #endif case TYREAL: - Ptr->flreal=f__lx; + Ptr->flreal= (real) f__lx; break; case TYDREAL: Ptr->fldouble=f__lx; break; case TYCOMPLEX: xx=(real *)ptr; - *xx++ = f__lx; - *xx = f__ly; + *xx++ = (real) f__lx; + *xx = (real) f__ly; break; case TYDCOMPLEX: yy=(doublereal *)ptr; diff --git a/ext/f2c_libs/lwrite.c b/ext/f2c_libs/lwrite.c index 9e0d93deb..5b5fe249d 100644 --- a/ext/f2c_libs/lwrite.c +++ b/ext/f2c_libs/lwrite.c @@ -169,7 +169,7 @@ l_g(char *buf, double n) } } f__ret: - return b - buf; + return (int) (b - buf); #endif } diff --git a/ext/f2c_libs/open.c b/ext/f2c_libs/open.c index 6e3def121..16594690c 100644 --- a/ext/f2c_libs/open.c +++ b/ext/f2c_libs/open.c @@ -286,7 +286,7 @@ fk_open(int seq, int fmt, ftnint n) a.oerr=1; a.ounit=n; a.ofnm=nbuf; - a.ofnmlen=strlen(nbuf); + a.ofnmlen= (ftnlen) strlen(nbuf); a.osta=NULL; a.oacc= (char*)(seq==SEQ?"s":"d"); a.ofm = (char*)(fmt==FMT?"f":"u"); diff --git a/ext/f2c_libs/pow_ci.c b/ext/f2c_libs/pow_ci.c index 574e0b1eb..070622236 100644 --- a/ext/f2c_libs/pow_ci.c +++ b/ext/f2c_libs/pow_ci.c @@ -18,8 +18,8 @@ a1.i = a->i; pow_zi(&p1, &a1, b); -p->r = p1.r; -p->i = p1.i; +p->r = (real) p1.r; +p->i = (real) p1.i; } #ifdef __cplusplus } diff --git a/ext/f2c_libs/rdfmt.c b/ext/f2c_libs/rdfmt.c index 62b280534..817d379b9 100644 --- a/ext/f2c_libs/rdfmt.c +++ b/ext/f2c_libs/rdfmt.c @@ -64,8 +64,8 @@ rd_Z(Uint *n, int w, ftnlen len) if (bad) return errno = 115; w = (int)len; - w1 = s - s0; - w2 = w1+1 >> 1; + w1 = (int) (s - s0); + w2 = (w1+1) >> 1; t = (char *)n; if (*(char *)&one) { /* little endian */ @@ -87,7 +87,7 @@ rd_Z(Uint *n, int w, ftnlen len) t += i; } do { - *t = hex[*s0 & 0xff]-1 << 4 | hex[s0[1] & 0xff]-1; + *t = (hex[*s0 & 0xff]-1) << 4 | hex[s0[1] & 0xff]-1; t += i; s0 += 2; } @@ -383,7 +383,7 @@ done: } zero: if (len == sizeof(real)) - p->pf = x; + p->pf = (real) x; else p->pd = x; return(0); diff --git a/ext/f2c_libs/wref.c b/ext/f2c_libs/wref.c index f2074b75e..a9ecec70a 100644 --- a/ext/f2c_libs/wref.c +++ b/ext/f2c_libs/wref.c @@ -96,7 +96,7 @@ nogood: case 'N': signspace = 0; /* no sign for NaNs */ } - delta = w - strlen(buf) - signspace; + delta = w - (int) strlen(buf) - signspace; if (delta < 0) goto nogood; while(--delta >= 0) diff --git a/ext/f2c_libs/wrtfmt.c b/ext/f2c_libs/wrtfmt.c index a970db959..8fef6763b 100644 --- a/ext/f2c_libs/wrtfmt.c +++ b/ext/f2c_libs/wrtfmt.c @@ -93,7 +93,7 @@ wrt_Z(Uint *n, int w, int minlen, ftnlen len) for(;; s += i) if (s == se || *s) break; - w1 = (i*(se-s) << 1) + 1; + w1 = (int) (i*(se-s) << 1) + 1; if (*s & 0xf0) w1++; if (w1 > w) diff --git a/ext/f2c_math/ddaspk.c b/ext/f2c_math/ddaspk.c index 44ffb2319..052eb72cd 100644 --- a/ext/f2c_math/ddaspk.c +++ b/ext/f2c_math/ddaspk.c @@ -8561,7 +8561,7 @@ L30: } i__2 = km1; for (j = 1; j <= i__2; ++j) { - i__ = (j - 1 << 1) + 1; + i__ = ((j - 1) << 1) + 1; t1 = a[j + k * a_dim1]; t2 = a[j + 1 + k * a_dim1]; c__ = q[i__]; @@ -8617,7 +8617,7 @@ L70: /* ----------------------------------------------------------------------- */ i__1 = nm1; for (k = 1; k <= i__1; ++k) { - i__ = (k - 1 << 1) + 1; + i__ = ((k - 1) << 1) + 1; t1 = a[k + *n * a_dim1]; t2 = a[k + 1 + *n * a_dim1]; c__ = q[i__]; @@ -8745,7 +8745,7 @@ L130: i__1 = *n; for (k = 1; k <= i__1; ++k) { kp1 = k + 1; - iq = (k - 1 << 1) + 1; + iq = ((k - 1) << 1) + 1; c__ = q[iq]; s = q[iq + 1]; t1 = b[k]; diff --git a/ext/f2c_math/j4save.c b/ext/f2c_math/j4save.c index 733e9e848..db219b885 100644 --- a/ext/f2c_math/j4save.c +++ b/ext/f2c_math/j4save.c @@ -69,7 +69,7 @@ integer j4save_(integer *iwhich, integer *ivalue, logical *iset) /* ***END PROLOGUE J4SAVE */ /* SAVE IPARAM */ /* ***FIRST EXECUTABLE STATEMENT J4SAVE */ - ret_val = iparam[(0 + (0 + (*iwhich - 1 << 2))) / 4]; + ret_val = iparam[(0 + (0 + ((*iwhich - 1) << 2))) / 4]; if (*iset) { iparam[*iwhich - 1] = *ivalue; } diff --git a/ext/f2c_math/polfit.c b/ext/f2c_math/polfit.c index a3faea6a7..85ddb2018 100644 --- a/ext/f2c_math/polfit.c +++ b/ext/f2c_math/polfit.c @@ -174,7 +174,7 @@ k3 = 0; k4 = 0; k5 = 0; - etst = 1.0E-13; + etst = 1.0E-13f; xm = 1.0; /* Function Body */ @@ -230,7 +230,7 @@ L16: temd1 += (doublereal) x[i__] * (doublereal) w[i__] * temd2 * temd2; /* L18: */ } - a[jp1] = temd1 / (doublereal) w11; + a[jp1] = (real) (temd1 / w11); /* EVALUATE ORTHOGONAL POLYNOMIAL AT DATA POINTS */ @@ -263,7 +263,7 @@ L16: temd1 += temd2; } temd1 /= (doublereal) w11; - a[k2pj + 1] = temd1; + a[k2pj + 1] = (real) temd1; /* UPDATE POLYNOMIAL EVALUATIONS AT EACH OF THE DATA POINTS, AND */ /* ACCUMULATE SUM OF SQUARES OF ERRORS. THE POLYNOMIAL EVALUATIONS ARE */ @@ -278,8 +278,8 @@ L16: k5pi = k5 + i__; temd2 = (doublereal) r__[i__] + (doublereal) a[k5pi] + temd1 * ( doublereal) a[k4pi]; - r__[i__] = temd2; - a[k5pi] = temd2 - (doublereal) r__[i__]; + r__[i__] = (real) temd2; + a[k5pi] = (real) (temd2 - r__[i__]); /* L21: */ /* Computing 2nd power */ r__1 = y[i__] - r__[i__] - a[k5pi]; @@ -397,7 +397,7 @@ L33: /* L35: */ } L36: - *eps = sqrt(sig / xm); + *eps = (real) sqrt(sig / xm); L37: return 0; } /* polfit_ */ diff --git a/ext/f2c_math/pvalue.c b/ext/f2c_math/pvalue.c index 1afe90937..cab59d9d3 100644 --- a/ext/f2c_math/pvalue.c +++ b/ext/f2c_math/pvalue.c @@ -87,11 +87,11 @@ } ndo = max(*nder,0); ndo = min(ndo,*l); - maxord = a[1] + .5f; + maxord = (integer) (a[1] + .5f); k1 = maxord + 1; k2 = k1 + maxord; k3 = k2 + maxord + 2; - nord = a[k3] + .5f; + nord = (integer) (a[k3] + .5f); if (*l > nord) { goto L11; } diff --git a/ext/f2c_math/xersve.c b/ext/f2c_math/xersve.c index 3c93c4161..4967c5a3e 100644 --- a/ext/f2c_math/xersve.c +++ b/ext/f2c_math/xersve.c @@ -143,8 +143,8 @@ static integer c__1 = 1; for (i__ = 1; i__ <= i__2; ++i__) { io___9.ciunit = iunit; s_wsfe(&io___9); - do_fio(&c__1, libtab + (i__ - 1 << 3), (ftnlen)8); - do_fio(&c__1, subtab + (i__ - 1 << 3), (ftnlen)8); + do_fio(&c__1, libtab + ((i__ - 1) << 3), (ftnlen)8); + do_fio(&c__1, subtab + ((i__ - 1) << 3), (ftnlen)8); do_fio(&c__1, mestab + (i__ - 1) * 20, (ftnlen)20); do_fio(&c__1, (char *)&nertab[i__ - 1], (ftnlen)sizeof( integer)); @@ -187,8 +187,8 @@ static integer c__1 = 1; s_copy(mes, messg, (ftnlen)20, messg_len); i__1 = nmsg; for (i__ = 1; i__ <= i__1; ++i__) { - if (s_cmp(lib, libtab + (i__ - 1 << 3), (ftnlen)8, (ftnlen)8) == - 0 && s_cmp(sub, subtab + (i__ - 1 << 3), (ftnlen)8, ( + if (s_cmp(lib, libtab + ((i__ - 1) << 3), (ftnlen)8, (ftnlen)8) == + 0 && s_cmp(sub, subtab + ((i__ - 1) << 3), (ftnlen)8, ( ftnlen)8) == 0 && s_cmp(mes, mestab + (i__ - 1) * 20, ( ftnlen)20, (ftnlen)20) == 0 && *nerr == nertab[i__ - 1] && *level == levtab[i__ - 1]) { @@ -204,8 +204,8 @@ static integer c__1 = 1; /* Empty slot found for new message. */ ++nmsg; - s_copy(libtab + (i__ - 1 << 3), lib, (ftnlen)8, (ftnlen)8); - s_copy(subtab + (i__ - 1 << 3), sub, (ftnlen)8, (ftnlen)8); + s_copy(libtab + ((i__ - 1) << 3), lib, (ftnlen)8, (ftnlen)8); + s_copy(subtab + ((i__ - 1) << 3), sub, (ftnlen)8, (ftnlen)8); s_copy(mestab + (i__ - 1) * 20, mes, (ftnlen)20, (ftnlen)20); nertab[i__ - 1] = *nerr; levtab[i__ - 1] = *level;