From cc9b4bafbc4d712a483ce5b5b336ad80183edce3 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 3 May 2011 15:27:11 -0600 Subject: [PATCH] test-getaddrinfo: report error information Clang deduced that if ENABLE_DEBUGGING is undefined, then err was a dead assignment. But in the EAI_SYSTEM case, we fail the test, so the output should be unconditional. * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf. Signed-off-by: Eric Blake --- ChangeLog | 5 +++++ tests/test-getaddrinfo.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8f96680f74..5df08520c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-03 Eric Blake + + test-getaddrinfo: report error information + * tests/test-getaddrinfo.c (simple): Use err outside of dbprintf. + 2011-05-03 Jim Meyering bootstrap: avoid build failure when $GZIP is set diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c index 482698937a..d2984e226b 100644 --- a/tests/test-getaddrinfo.c +++ b/tests/test-getaddrinfo.c @@ -107,7 +107,7 @@ simple (char const *host, char const *service) #endif /* Provide details if errno was set. */ if (res == EAI_SYSTEM) - dbgprintf ("system error: %s\n", strerror (err)); + fprintf (stderr, "system error: %s\n", strerror (err)); return 1; } -- 2.30.2