From: Frédéric Bérat Date: Thu, 1 Jun 2023 14:27:44 +0000 (+0200) Subject: nptl_db/thread_dbP.h: fix warn unused result X-Git-Tag: glibc-2.38~166 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a952fcda58cd7aa191140fc9e7d453df212b9117;p=thirdparty%2Fglibc.git nptl_db/thread_dbP.h: fix warn unused result Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in glibc. Reviewed-by: Siddhesh Poyarekar --- diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h index 88457221093..b52c254300d 100644 --- a/nptl_db/thread_dbP.h +++ b/nptl_db/thread_dbP.h @@ -61,7 +61,9 @@ enum /* Comment out the following for less verbose output. */ #ifndef NDEBUG -# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n")) +# define LOG(c) \ + if (__td_debug) \ + assert (write (2, c "\n", strlen (c "\n")) == strlen (c "\n")) extern int __td_debug attribute_hidden; #else # define LOG(c)