[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] [PATCH] tar: remove lint discovered by Sun C compiler
From: |
Paul Eggert |
Subject: |
[Bug-tar] [PATCH] tar: remove lint discovered by Sun C compiler |
Date: |
Sat, 04 Sep 2010 23:55:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 |
I installed this:
* 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 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/common.h b/src/common.h
index e5e619d..ce77005 100644
--- a/src/common.h
+++ b/src/common.h
@@ -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);
--
1.7.2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] [PATCH] tar: remove lint discovered by Sun C compiler,
Paul Eggert <=