summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-30 07:52:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-08-30 07:52:46 -0700
commitbaeaa83e31da3a1a36d2a1f76140b67ff76859fe (patch)
tree5610b95751b9f1ca6e35081e9df3fb6671735e26
parentf6ac439e484731a8a910bcd91e45039a3fa39c59 (diff)
downloaddiffutils-baeaa83e31da3a1a36d2a1f76140b67ff76859fe.tar.gz
diff: silence GCC warning instead of slowing down
* src/dir.c (find_dir_file_pathname): Use 'IF_LINT (volatile)' to silence the gcc warning, rather than using 'volatile', as the warning appears to be bogus.
-rw-r--r--src/dir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dir.c b/src/dir.c
index a2f6bba..530807e 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -323,8 +323,13 @@ dir_loop (struct comparison const *cmp, int i)
char *
find_dir_file_pathname (char const *dir, char const *file)
{
+ /* The 'IF_LINT (volatile)' works around what appears to be a bug in
+ gcc 4.8.0 20120825; see
+ <http://lists.gnu.org/archive/html/bug-diffutils/2012-08/msg00007.html>.
+ */
+ char const * IF_LINT (volatile) match = file;
+
char *val;
- char const *volatile match = file;
struct dirdata dirdata;
dirdata.names = NULL;
dirdata.data = NULL;