bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] lib/rename.c: rpl_rename - Avoid unused-but-set-variable com


From: Paul Eggert
Subject: Re: [PATCH] lib/rename.c: rpl_rename - Avoid unused-but-set-variable compiler warning
Date: Mon, 02 Jun 2014 16:13:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 06/02/2014 12:45 PM, Ben Walton wrote:
The value is only referenced if RENAME_DEST_EXISTS_BUG is set. Otherwise, it's set but never used again. This patch addresses the case where RENAME_DEST_EXISTS_BUG is unset. Thanks -Ben

Since that's not obvious, it might be a bit cleaner to have something like this instead:

# if RENAME_DEST_EXISTS_BUG
     bool dst_exists = false;
# endif

...

# if RENAME_DEST_EXISTS_BUG
      dst_exists = true;
# endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]