build: avoid warning about ignored chown/fchown return value
authorJim Meyering <meyering@redhat.com>
Thu, 17 Dec 2009 15:48:59 +0000 (16:48 +0100)
committerJim Meyering <meyering@redhat.com>
Wed, 30 Dec 2009 16:33:55 +0000 (17:33 +0100)
* bootstrap.conf (gnulib_modules): Add ignore-value.
* gzip.c: Include "ignore-value.h".
(copy_stat): Explicitly ignore chown and fchown failure

bootstrap.conf
gzip.c
lib/.gitignore

index f0afe13bbf1f12ab6eae917b42239e735de8b8bd..ce9a9f789210e60f55270f544740290143dbdb3d 100644 (file)
@@ -38,6 +38,7 @@ gnu-make
 gnu-web-doc-update
 gnumakefile
 gnupload
+ignore-value
 lstat
 maintainer-makefile
 malloc
diff --git a/gzip.c b/gzip.c
index 07bebc3bbcfb0e2208cfa8fe9fad866f39c48686..cdaaab31085f4f166325e49b3c911c723017a5a9 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -69,6 +69,7 @@ static char const *const license_msg[] = {
 
 #include "fcntl-safer.h"
 #include "getopt.h"
+#include "ignore-value.h"
 #include "stat-time.h"
 
                /* configuration */
@@ -1677,10 +1678,11 @@ local void copy_stat(ifstat)
 #endif
 
 #ifndef NO_CHOWN
+    /* Copy ownership */
 # if HAVE_FCHOWN
-    fchown (ofd, ifstat->st_uid, ifstat->st_gid);  /* Copy ownership */
+    ignore_value (fchown (ofd, ifstat->st_uid, ifstat->st_gid));
 # elif HAVE_CHOWN
-    chown(ofname, ifstat->st_uid, ifstat->st_gid);  /* Copy ownership */
+    ignore_value (chown (ofname, ifstat->st_uid, ifstat->st_gid));
 # endif
 #endif
 
index e7eba30fb7bca39fcd00728aed7cfc6630c5f6d7..7b4f467b136c9cab5f50fcd6fdb076ba838838ab 100644 (file)
@@ -82,6 +82,7 @@ gettext.h
 gettime.c
 gettimeofday.c
 gnulib.mk
+ignore-value.h
 intprops.h
 isnan.c
 isnand-nolibm.h