diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-05 08:50:28 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-03-05 08:50:28 +0000 |
commit | edc562bfa3e97201709f690ae5c738b150dc365c (patch) | |
tree | f503ef4c651ce308e73c294ba085da48f155d66f /Build/source/texk/kpathsea | |
parent | fd915ec757813cf18b6929c70136a63965d31327 (diff) |
build: Avoid various (gcc-4.x) compiler warnings
git-svn-id: svn://tug.org/texlive/trunk@25567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/lib.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 261715995fb..355e77eb39b 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,9 @@ +2012-03-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + Avoid 'the address of XXX will always evaluate as true' warnings. + * lib.h (STREQ): Test '(s) != NULL' instead of '(s)'. + Gcc >=4.3 produces identical code but -Wall yields no warning. + 2012-03-01 Peter Breitenlohner <peb@mppmu.mpg.de> * c-unistd.h: Declare getopt() (via <kpathsea/getopt.h>) but diff --git a/Build/source/texk/kpathsea/lib.h b/Build/source/texk/kpathsea/lib.h index 13a4f4c7c8c..89a50dc961b 100644 --- a/Build/source/texk/kpathsea/lib.h +++ b/Build/source/texk/kpathsea/lib.h @@ -94,7 +94,7 @@ /* I find this easier to read. */ -#define STREQ(s1, s2) ((s1) && (s2) && (strcmp (s1, s2) == 0)) +#define STREQ(s1, s2) (((s1) != NULL) && ((s2) != NULL) && (strcmp (s1, s2) == 0)) #define STRNEQ(s1, s2, n) ((s1) && (s2) && (strncmp (s1, s2, n) == 0)) /* Support for FAT/ISO-9660 filesystems. Theoretically this should be |