diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-30 07:52:22 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-30 07:52:46 -0700 |
commit | baeaa83e31da3a1a36d2a1f76140b67ff76859fe (patch) | |
tree | 5610b95751b9f1ca6e35081e9df3fb6671735e26 | |
parent | f6ac439e484731a8a910bcd91e45039a3fa39c59 (diff) | |
download | diffutils-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.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; |