Fixes these warnings: endfile.c:30:27: warning: format specifies type 'long' but the argument has type 'ftnint' (aka 'int') [-Wformat] 30 | sprintf(nbuf,"fort.%ld",a->aunit); | ~~~ ^~~~~~~~ | %d open.c:285:32: warning: format specifies type 'long' but the argument has type 'ftnint' (aka 'int') [-Wformat] 285 | sprintf(buf, "fort.%ld", a->ounit); | ~~~ ^~~~~~~~ | %d open.c:434:35: warning: format specifies type 'long' but the argument has type 'ftnint' (aka 'int') [-Wformat] 434 | (void) sprintf(nbuf,"fort.%ld",n); | ~~~ ^ | %d signal_.c:14:9: warning: cast to smaller integer type 'ftnint' (aka 'int') from 'void (*)(int)' [-Wpointer-to-int-cast] 14 | return (ftnint)signal(sig, proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ diff -ur src/cspice/endfile.c src/cspice/endfile.c --- src/cspice/endfile.c +++ src/cspice/endfile.c @@ -26,8 +26,8 @@ if(a->aunit>=MXUNIT || a->aunit<0) err(a->aerr,101,"endfile"); b = &f__units[a->aunit]; if(b->ufd==NULL) { - char nbuf[10]; - sprintf(nbuf,"fort.%ld",a->aunit); + char nbuf[32]; + sprintf(nbuf,"fort.%ld",(long)a->aunit); if (tf = fopen(nbuf, f__w_mode[0])) fclose(tf); return(0); diff -ur src/cspice/open.c src/cspice/open.c --- src/cspice/open.c +++ src/cspice/open.c @@ -282,7 +282,7 @@ opnerr(a->oerr,107,"open") } else - sprintf(buf, "fort.%ld", a->ounit); + sprintf(buf, "fort.%ld", (long)a->ounit); b->uscrtch = 0; b->uend=0; b->uwrt = 0; @@ -429,9 +429,9 @@ #endif { - char nbuf[10]; + char nbuf[32]; olist a; - (void) sprintf(nbuf,"fort.%ld",n); + (void) sprintf(nbuf,"fort.%ld",(long)n); a.oerr=1; a.ounit=n; a.ofnm=nbuf; diff -ur src/cspice/signal_.c src/cspice/signal_.c --- src/cspice/signal_.c +++ src/cspice/signal_.c @@ -1,7 +1,7 @@ #include "f2c.h" #include "signal1.h" - ftnint + sig_pf #ifdef KR_headers signal_(sigp, proc) integer *sigp; sig_pf proc; #else @@ -11,5 +11,5 @@ int sig; sig = (int)*sigp; - return (ftnint)signal(sig, proc); + return signal(sig, proc); }