From: Eric Blake Date: Tue, 3 May 2011 21:27:11 +0000 (-0600) Subject: test-getaddrinfo: report error information X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc9b4bafbc4d712a483ce5b5b336ad80183edce3;p=pspp 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 --- 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; }