You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
31df8bb6a2
add Debian patches - maintainer timeout closes https://trac.macports.org/ticket/53116
45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
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;
|
||
}
|