bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Pádraig Brady" <P@draigBrady.com>
To: bug-gnulib@gnu.org
Subject: [PATCH] test-canonicalize: avoid a build failure
Date: Tue,  4 Feb 2020 01:04:34 +0000	[thread overview]
Message-ID: <20200204010434.301261-1-P@draigBrady.com> (raw)

* 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 -Werror=unused build failure,
warning about the function being defined but unused.
* tests/test-canonicalize-lgpl.c: Likewise.
---
 ChangeLog                      | 9 +++++++++
 tests/test-canonicalize-lgpl.c | 5 ++++-
 tests/test-canonicalize.c      | 5 ++++-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2a86791a8..5e524c56d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-02-04  Pádraig Brady  <P@draigBrady.com>
+
+	test-canonicalize: avoid a build failure
+	* 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 -Werror=unused build failure,
+	warning about the function being defined but unused.
+	* tests/test-canonicalize-lgpl.c: Likewise.
+
 2020-02-02  Bruno Haible  <bruno@clisp.org>
 
 	Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++.
diff --git a/tests/test-canonicalize-lgpl.c b/tests/test-canonicalize-lgpl.c
index fb49b2047..ff829814e 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 81580c53d..e0b623f19 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.24.1



             reply	other threads:[~2020-02-04  1:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04  1:04 Pádraig Brady [this message]
2020-02-04  2:15 ` [PATCH] test-canonicalize: avoid a build failure Bruno Haible
2020-02-11  2:27 ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200204010434.301261-1-P@draigBrady.com \
    --to=p@draigbrady.com \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).