From 203dda3b86d5c9ac5a661d61038c284370448ca8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Tue, 4 Feb 2020 00:57:12 +0000 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ tests/test-canonicalize-lgpl.c | 5 ++++- tests/test-canonicalize.c | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) 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" -- 2.39.5