]> Savannah Git Hosting - gnulib.git/commitdiff
test-canonicalize: avoid an unused function warning
authorPádraig Brady <P@draigBrady.com>
Tue, 4 Feb 2020 00:57:12 +0000 (00:57 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 4 Feb 2020 19:09:24 +0000 (19:09 +0000)
* 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
tests/test-canonicalize-lgpl.c
tests/test-canonicalize.c

index 5afe0156312dcf96bc114a5c7b6250d4586c8ae8..4cfa7a9e3f345cce524839577999fff0aba583ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-04  Pádraig Brady  <P@draigBrady.com>
+
+       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  <eggert@cs.ucla.edu>
 
        libc-config: port to Apple’s Clang variant
index fb49b2047e86ee0ea02c721c5496d825d920cea2..ff829814ed9d683a65d743fc4ba4d0db6fe35c8f 100644 (file)
@@ -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"
index 81580c53d5e74229e1750c1584aade8645dda015..e0b623f19b2c1da31c15bcbc930b5eac97c2ba15 100644 (file)
 #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"