Files
Kurt Hindenburg 31df8bb6a2 arc: update to 5.21p
add Debian patches - maintainer timeout

closes https://trac.macports.org/ticket/53116
2017-01-26 10:03:13 -05:00

45 lines
1.6 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Description: fix some GCC warnings.
Author: Adilson dos Reis <adilsondosreis@yahoo.com.br>
Last-Update: 2015-09-01
Index: arc-5.21q/arcadd.c
===================================================================
--- arcadd.c
+++ 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
===================================================================
--- arcext.c
+++ 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
===================================================================
--- arcio.c
+++ 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;
}