{
int c;
char c_char;
+ size_t dummy;
/*fprintf(stderr,"about to fgetc(\045p)",(void*)fp);*/
c_char=0; /* AIS */
- (void)fread(&c_char,1,1,fp);
+ dummy = fread(&c_char,1,1,fp);
/* AIS: ignore the first \r in a row to deal with DOS newlines. The
second in a row is definitely an error, though, and will be caught
later on. */
- if(c_char=='\r') (void)fread(&c_char,1,1,fp);
+ if(c_char=='\r') dummy = fread(&c_char,1,1,fp);
c = c_char;
if(feof(fp)) c=EOF;
void splitstart(void)
{
static char fname[]="oilout00.c";
+ FILE *dummy; /* GCC 4 un-suppressable warning suck */
if(filenumber>255)
{
filenumber=255;
fprintf(stdout,"Input file too long.\n");
}
sprintf(fname,"oilout%02x.c",filenumber);
- freopen(fname,"w",stdout);
+ dummy = freopen(fname,"w",stdout);
puts("/* Automatically generated output, edit source and recompile to "
"change */");
printf("#include \"oil.h\"\n"
int main(void)
{
int e,i;
+ FILE *dummy; /* GCC 4 un-suppressible warnings suck */
/*
" if(!np) return 0;\n"
" if(np->lval) opted|=optimize_pass1(np->lval);\n"
e=yyparse();
while(tfi--) free(tofree[tfi]);
splitend();
- freopen("oilout-m.c","w",stdout);
+ dummy = freopen("oilout-m.c","w",stdout);
puts("/* Automatically generated output, edit source and recompile to "
"change */");
puts("#include \"config.h\"");
#define ARGSTRING "abcdefghlmoptuvwxyCEFHOPUYX@"
-#define ICK_SYSTEM(x) do{if(showsystem)fprintf(stderr,"%s\n",x); \
- (void) system(x);}while(0)
+/* unused st variable quiets a GCC4 warning */
+#define ICK_SYSTEM(x) do{int st;if(showsystem)fprintf(stderr,"%s\n",x); \
+ st=system(x);}while(0)
#ifdef USE_YYRESTART
/* function supplied by lex */
static int myfgetc(FILE* in)
{
char c;
- (void) fread(&c,1,1,in);
+ size_t dummy;
+ dummy = fread(&c,1,1,in);
if(feof(in)) return EOF;
return (int)c;
}
{
int i,lastline,thisline,inrow=0;
yptimer avgtime,avgtime2;
+ FILE *dummy;
if(yukopts==2) (void) puts("Program ended without error.");
if(!(yukopts&1)) return;
/* Print profiling information */
(void) puts("Profiling information saved to \"yuk.out\".");
- (void) freopen("yuk.out","w",stdout);
+ /* Bletch. GCC's unsuppressible warning forces us to this */
+ dummy = freopen("yuk.out","w",stdout);
i=-1;
lastline=-1;
while(++i<yukcommands)
{
printf("yuk007 "); /* this is our prompt, a sort of reverse
INTERCAL version of % */
- (void) fgets(buf,20,stdin);
+ if (fgets(buf,20,stdin) == NULL)
+ break;;
if(!strchr(buf,'\n'))
{
ick_lose(IE810,emitlineno,(const char*)NULL);
#else
(void) snprintf(copyloc,sizeof copyloc,"more < %s",tempcharp);
#endif
- (void) system(copyloc); /* display the GNU GPL copyright */
+ if (system(copyloc) != 0) /* display the GNU GPL copyright */
+ (void) puts("Your system is more confused.");
}
else
(void) puts("Couldn't find license file. See the file COPYING.txt that\n"