From: Pádraig Brady Date: Tue, 4 Feb 2020 00:57:12 +0000 (+0000) Subject: test-canonicalize: avoid an unused function warning X-Git-Tag: v1.0~4268 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=203dda3b86d5c9ac5a661d61038c284370448ca8;p=gnulib.git test-canonicalize: avoid an unused function warning * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h with the same guard as that used to protect usage of the null_ptr function, so that one doesn't get a -Wunused warning about the function being defined but unused. * tests/test-canonicalize-lgpl.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 5afe015631..4cfa7a9e3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-02-04 Pádraig Brady + + test-canonicalize: avoid unused function warning + * tests/test-canonicalize.c: Protect the inclusion of null-ptr.h + with the same guard as that used to protect usage of the null_ptr + function, so that one doesn't get a -Wunused warning. + * tests/test-canonicalize-lgpl.c: Likewise. + 2020-02-03 Paul Eggert libc-config: port to Apple’s Clang variant diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c index fb49b2047e..ff829814ed 100644 --- a/tests/test-canonicalize-lgpl.c +++ b/tests/test-canonicalize-lgpl.c @@ -39,7 +39,10 @@ SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *)); #include "same-inode.h" #include "ignore-value.h" -#include "null-ptr.h" +#if GNULIB_defined_canonicalize_file_name +# include "null-ptr.h" +#endif + #include "macros.h" #define BASE "t-can-lgpl.tmp" diff --git a/tests/test-canonicalize.c b/tests/test-canonicalize.c index 81580c53d5..e0b623f19b 100644 --- a/tests/test-canonicalize.c +++ b/tests/test-canonicalize.c @@ -36,7 +36,10 @@ #include "same-inode.h" #include "ignore-value.h" -#include "null-ptr.h" +#if GNULIB_defined_canonicalize_file_name +# include "null-ptr.h" +#endif + #include "macros.h" #define BASE "t-can.tmp"