aboutsummaryrefslogtreecommitdiffstats
path: root/extension/inplace.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-11-23 19:57:09 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-11-23 19:57:09 +0200
commit0b07960513cbb8aa76b6f301b23cf73b5b2019c7 (patch)
treeb6265a6641d4d203f6ed10cd0cd571aab8683811 /extension/inplace.c
parentb15c7145da2b28bdb0f6521428d5f057a7dc8cfb (diff)
parent2513062a4c89b0b60c3717d506fce841d44d871e (diff)
downloadegawk-0b07960513cbb8aa76b6f301b23cf73b5b2019c7.tar.gz
egawk-0b07960513cbb8aa76b6f301b23cf73b5b2019c7.tar.bz2
egawk-0b07960513cbb8aa76b6f301b23cf73b5b2019c7.zip
Merge branch 'gawk-4.1-stable'
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)"),