]> Dogcows Code - chaz/tar/commitdiff
tar: remove lint discovered by Sun C compiler
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Sep 2010 06:52:34 +0000 (23:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Sep 2010 06:53:23 +0000 (23:53 -0700)
* src/common.h (WARN_ALL): Don't mask with 0xffffffff; on a 32-bit
host, 0xffffffff is of type 'unsigned int', which makes WARN_ALL
an unsigned int value that is too large to fit into an int, and
the C standard says that this has undefined behavior.  The mask is
not needed, so omit it.

src/common.h

index e5e619d83bb1dd38523cd7432611dfd85771c3c0..ce77005315be2b821ba62c64c6c43a2a3fc33bc0 100644 (file)
@@ -796,7 +796,7 @@ void checkpoint_run (bool do_write);
 /* The warnings composing WARN_VERBOSE_WARNINGS are enabled by default
    in verbose mode */
 #define WARN_VERBOSE_WARNINGS    (WARN_RENAME_DIRECTORY|WARN_NEW_DIRECTORY)
-#define WARN_ALL                 (0xffffffff & ~WARN_VERBOSE_WARNINGS)
+#define WARN_ALL                 (~WARN_VERBOSE_WARNINGS)
 
 void set_warning_option (const char *arg);
 
This page took 0.028292 seconds and 4 git commands to generate.