>From 28b15af95870f363a93a8d53c7a975b014ba7dee Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Aug 2020 13:00:40 +0200 Subject: [PATCH 05/13] Fix "warning: address of array 'locale' will always evaluate to 'true'". * lib/nl_langinfo.c (ctype_codeset): Remove redundant NULL test. --- ChangeLog | 3 +++ lib/nl_langinfo.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f08d762..a7a22d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2020-08-16 Bruno Haible + Fix "warning: address of array 'locale' will always evaluate to 'true'". + * lib/nl_langinfo.c (ctype_codeset): Remove redundant NULL test. + Fix "warning: '__stat64' macro redefined". * lib/glob.c (__stat64): Undefine also on MSVC/clang. diff --git a/lib/nl_langinfo.c b/lib/nl_langinfo.c index 23299cb..869d831 100644 --- a/lib/nl_langinfo.c +++ b/lib/nl_langinfo.c @@ -57,7 +57,7 @@ ctype_codeset (void) codeset = buf; codeset[0] = '\0'; - if (locale && locale[0]) + if (locale[0]) { /* If the locale name contains an encoding after the dot, return it. */ char *dot = strchr (locale, '.'); -- 2.7.4