From: Benno Schulenberg Date: Wed, 2 Apr 2014 20:09:16 +0000 (+0000) Subject: Adding a dummy if to silence a compiler warning. Patch by Mike Frysinger. X-Git-Tag: v2.3.3~227 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d28ed53db13dc0674b2260a08d5c0e074bdfec60;p=nano.git Adding a dummy if to silence a compiler warning. Patch by Mike Frysinger. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index a6261102..39617ca0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2014-04-02 Mike Frysinger * doc/man/{,fr}/Makefile.am: Simplify the man rules still further. * .gitignore: Add 'config.cache', created by './configure -C'. + * src/nano.c (die_save_file): Newer gcc warns about set-but-unused + variables, so add a dummy if() check to kill that off. 2014-03-31 Chris Allegretta * doc/syntax/go.nanorc: basic go syntax highlighting diff --git a/src/nano.c b/src/nano.c index 22305bb7..083779a8 100644 --- a/src/nano.c +++ b/src/nano.c @@ -723,6 +723,8 @@ void die_save_file(const char *die_filename int shush; shush = chmod(retval, die_stat->st_mode); shush = chown(retval, die_stat->st_uid, die_stat->st_gid); + if (shush) + ; } #endif