From 6da036321bf3fec250a3e7924846b035de2bb180 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 17 Dec 2009 16:48:59 +0100 Subject: [PATCH] build: avoid warning about ignored chown/fchown return value * bootstrap.conf (gnulib_modules): Add ignore-value. * gzip.c: Include "ignore-value.h". (copy_stat): Explicitly ignore chown and fchown failure --- bootstrap.conf | 1 + gzip.c | 6 ++++-- lib/.gitignore | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index f0afe13..ce9a9f7 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -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 07bebc3..cdaaab3 100644 --- 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 diff --git a/lib/.gitignore b/lib/.gitignore index e7eba30..7b4f467 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -82,6 +82,7 @@ gettext.h gettime.c gettimeofday.c gnulib.mk +ignore-value.h intprops.h isnan.c isnand-nolibm.h -- 2.47.2