public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] nptl_db/thread_dbP.h: fix warn unused result
@ 2023-06-01 17:24 Siddhesh Poyarekar
  0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2023-06-01 17:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a952fcda58cd7aa191140fc9e7d453df212b9117

commit a952fcda58cd7aa191140fc9e7d453df212b9117
Author: Frédéric Bérat <fberat@redhat.com>
Date:   Thu Jun 1 16:27:44 2023 +0200

    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 <siddhesh@sourceware.org>

Diff:
---
 nptl_db/thread_dbP.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index 8845722109..b52c254300 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-01 17:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 17:24 [glibc] nptl_db/thread_dbP.h: fix warn unused result Siddhesh Poyarekar

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).