Message ID | 20230428122142.928135-5-fberat@redhat.com |
---|---|
State | Superseded |
Delegated to: | Siddhesh Poyarekar |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E3BE3850206 for <patchwork@sourceware.org>; Fri, 28 Apr 2023 12:36:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E3BE3850206 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682685404; bh=2bP4Uh1YJG2ccOzO7JqPvbHW/SzgA6djf/e19D0gN8w=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Chh5WJBvvgelZQ8SkA0K7u+++kWIr+OExU5J++Cq3vnpWXSLPoHWSrM1kB0nxheGH 0A8aYrkcEaoq+Iw2JkX4U3IMrec/H7feOPVo58nESaiq0ma72PeWueVkzQarPMv8tM bmHDVbdi7jD1+dduBeY5txjfFJT9Pde5pm5mCLq0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 55D523858418 for <libc-alpha@sourceware.org>; Fri, 28 Apr 2023 12:35:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55D523858418 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-441-JpbCRzDGNxK6WkkSn5Y4gA-1; Fri, 28 Apr 2023 08:35:25 -0400 X-MC-Unique: JpbCRzDGNxK6WkkSn5Y4gA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7FC085A588; Fri, 28 Apr 2023 12:35:24 +0000 (UTC) Received: from Nymeria-redhat.redhat.com (unknown [10.39.193.84]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A751C15BA0; Fri, 28 Apr 2023 12:35:23 +0000 (UTC) To: libc-alpha@sourceware.org Cc: siddhesh@gotplt.org, fberat@redhat.com Subject: [PATCH v4 04/15] nptl_db/thread_dbP.h: fix warn unused result Date: Fri, 28 Apr 2023 14:21:31 +0200 Message-Id: <20230428122142.928135-5-fberat@redhat.com> In-Reply-To: <20230418121130.844302-7-fberat@redhat.com> References: <20230428122142.928135-1-fberat@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_B=C3=A9rat_via_Libc-alpha?= <libc-alpha@sourceware.org> Reply-To: =?utf-8?b?RnLDqWTDqXJpYyBCw6lyYXQ=?= <fberat@redhat.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Fix warn unused result
|
|
Commit Message
Frederic Berat
April 28, 2023, 12:21 p.m. UTC
Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in glibc. --- nptl_db/thread_dbP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2023-04-28 08:21, Frédéric Bérat wrote: > Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in > glibc. > --- > nptl_db/thread_dbP.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) LGTM. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> > > diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h > index 8845722109..4a9333658b 100644 > --- a/nptl_db/thread_dbP.h > +++ b/nptl_db/thread_dbP.h > @@ -61,7 +61,7 @@ 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)
On 2023-05-24 20:51, Siddhesh Poyarekar wrote: > > > On 2023-04-28 08:21, Frédéric Bérat wrote: >> Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in >> glibc. >> --- >> nptl_db/thread_dbP.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > LGTM. > > Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Actually... >> >> diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h >> index 8845722109..4a9333658b 100644 >> --- a/nptl_db/thread_dbP.h >> +++ b/nptl_db/thread_dbP.h >> @@ -61,7 +61,7 @@ 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")) This crossed 79 chars and needs to be split. >> extern int __td_debug attribute_hidden; >> #else >> # define LOG(c) >
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h index 8845722109..4a9333658b 100644 --- a/nptl_db/thread_dbP.h +++ b/nptl_db/thread_dbP.h @@ -61,7 +61,7 @@ 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)