Description: fix some GCC warnings. Author: Adilson dos Reis Last-Update: 2015-09-01 Index: arc-5.21q/arcadd.c =================================================================== --- arc-5.21q.orig/arcadd.c +++ arc-5.21q/arcadd.c @@ -274,6 +274,8 @@ addfile(path, name, update, fresh) /* ad printf(" Truncate to %s (y/n)? ", name); fflush(stdout); dummy = fgets(buf, STRLEN, stdin); + /* artifice to prevent GCC message: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] */ + if (dummy == NULL) {}; *buf = toupper(*buf); if (*buf == 'Y' || *buf == 'N') break; Index: arc-5.21q/arcext.c =================================================================== --- arc-5.21q.orig/arcext.c +++ arc-5.21q/arcext.c @@ -151,6 +151,8 @@ extfile(hdr, path, prt) /* extract a fi printf(" Overwrite it (y/n)? "); fflush(stdout); dummy = fgets(buf, STRLEN, stdin); + /* artifice to prevent GCC message: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] */ + if (dummy == NULL) {}; *buf = toupper(*buf); if (*buf == 'Y' || *buf == 'N') break; Index: arc-5.21q/arcio.c =================================================================== --- arc-5.21q.orig/arcio.c +++ arc-5.21q/arcio.c @@ -57,6 +57,8 @@ readhdr(hdr, f) /* read a header from * no need to check result */ dummy = ungetc(hdrver = fgetc(f), f); + /* artifice to prevent GCC message: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] */ + if (dummy == 0) {}; if (!(hdrver & 0x80) && hdrver <= ARCVER) break; }