diff options
Diffstat (limited to 'extension')
-rw-r--r-- | extension/ChangeLog | 5 | ||||
-rw-r--r-- | extension/inplace.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog index 940f7f15..41c8a0e4 100644 --- a/extension/ChangeLog +++ b/extension/ChangeLog @@ -1,3 +1,8 @@ +2014-11-23 Arnold D. Robbins <arnold@skeeve.com> + + * inplace.c (do_inplace_begin): Jump through hoops to silence + GCC warnings about return value of chown. + 2014-10-12 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (uninstall-so): Remove *.lib too, per suggestion diff --git a/extension/inplace.c b/extension/inplace.c index 8a7375c4..0693ad92 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -170,8 +170,12 @@ do_inplace_begin(int nargs, awk_value_t *result) state.tname, strerror(errno)); /* N.B. chown/chmod should be more portable than fchown/fchmod */ - if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0) - (void) chown(state.tname, -1, sbuf.st_gid); + if (chown(state.tname, sbuf.st_uid, sbuf.st_gid) < 0) { + /* jumping through hoops to silence gcc. :-( */ + int junk; + junk = chown(state.tname, -1, sbuf.st_gid); + junk = junk; + } if (chmod(state.tname, sbuf.st_mode) < 0) fatal(ext_id, _("inplace_begin: chmod failed (%s)"), |