aboutsummaryrefslogtreecommitdiffstats
path: root/extension/inplace.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/inplace.c')
-rw-r--r--extension/inplace.c8
1 files changed, 6 insertions, 2 deletions
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)"),