From patchwork Tue Apr 18 12:11:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frederic Berat X-Patchwork-Id: 1770120 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=YflpITAN; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q12qj6qFxz1ybC for ; Tue, 18 Apr 2023 22:12:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D34D53855590 for ; Tue, 18 Apr 2023 12:12:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D34D53855590 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681819967; bh=N71MVq6+YcrwDHJ3oSeJnDKt+ovKbDeywB+XmTzCBWo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=YflpITANJJ7CWSuXwv0J+ebfVtr76pjWLRcPLZkg61i9RG1oYvOgipYRJbrqilSQ4 8AOqz+GabKJ8SqtVq+ME2op7Vf1K/4gg5TL/XMb/AfiO0DedHfr9Pgtl9yEo3ChdW/ 55op5kbQZ4Th1SA09uYV+v9ZjQY52hzJg25eYdUg= 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.133.124]) by sourceware.org (Postfix) with ESMTPS id E5DD7385843E for ; Tue, 18 Apr 2023 12:11:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E5DD7385843E Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-588-YcWeO9SJNGGv0KzgzDuI5w-1; Tue, 18 Apr 2023 08:11:36 -0400 X-MC-Unique: YcWeO9SJNGGv0KzgzDuI5w-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 474B329DD98A for ; Tue, 18 Apr 2023 12:11:36 +0000 (UTC) Received: from Nymeria-redhat.redhat.com (unknown [10.39.193.127]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEB3440C83A9; Tue, 18 Apr 2023 12:11:35 +0000 (UTC) To: libc-alpha@sourceware.org Cc: sipoyare@redhat.com Subject: [PATCH 0/8] Fix warn unused result Date: Tue, 18 Apr 2023 14:11:22 +0200 Message-Id: <20230418121130.844302-1-fberat@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fr=C3=A9d=C3=A9ric_B=C3=A9rat_via_Libc-alpha?= From: Frederic Berat Reply-To: =?utf-8?b?RnLDqWTDqXJpYyBCw6lyYXQ=?= Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Hello, Enabling _FORTIFY_SOURCE on Glibc itself implies that some function get the __wur macro enabed. This leads to build failures when -Werror is set. I went for multiple patches for these fixes, a big one that cover the tests, and then separate one for the other ones, assuming they may need to get a closer look at. While most of the changes look trivial, decision I made on how to fix them may be open to debate, e.g. the additional checks may lead to failures while they weren't earlier, some other have no impact while it may be useful to have one. Feedback is therefore highly appreciated. Fred. --- Frédéric Bérat (8): tests: fix warn unused result catgets/gencat.c: fix warn unused result inet/rcmd.c: fix warn unused result locale/programs/locarchive.c: fix warn unused result malloc/{memusage.c,memusagestat.c}: fix warn unused result nptl_db/thread_dbP.h: fix warn unused result sunrpc/netname.c: fix warn unused result sysdeps/pthread/eintr.c: fix warn unused result argp/argp-test.c | 14 ++++++++++--- assert/test-assert-perr.c | 13 ++++++------ assert/test-assert.c | 13 ++++++------ catgets/gencat.c | 34 ++++++++++++++++++++---------- crypt/cert.c | 6 +++++- dirent/tst-fdopendir.c | 13 ++++++++++-- elf/tst-stackguard1.c | 2 +- inet/rcmd.c | 7 +++++-- io/tst-copy_file_range.c | 2 +- io/tst-faccessat.c | 6 +++++- io/tst-fchmodat.c | 6 +++++- io/tst-fchownat.c | 6 +++++- io/tst-fstatat.c | 6 +++++- io/tst-futimesat.c | 6 +++++- io/tst-linkat.c | 6 +++++- io/tst-openat.c | 6 +++++- io/tst-renameat.c | 6 +++++- io/tst-symlinkat.c | 6 +++++- io/tst-unlinkat.c | 6 +++++- libio/bug-fseek.c | 15 +++++++++++--- libio/bug-mmap-fflush.c | 12 +++++++++-- libio/bug-ungetc.c | 7 ++++++- libio/bug-ungetc3.c | 7 ++++++- libio/bug-ungetc4.c | 7 ++++++- libio/bug-wfflush.c | 6 +++++- libio/bug-wsetpos.c | 7 ++++++- locale/programs/locarchive.c | 18 +++++++++------- malloc/memusage.c | 38 +++++++++++++++++++++++----------- malloc/memusagestat.c | 13 ++++++++---- misc/tst-efgcvt-template.c | 4 ++-- misc/tst-error1.c | 2 +- nptl/tst-cancel7.c | 2 +- nptl/tst-cleanup4.c | 6 +++++- nptl/tst-stackguard1.c | 8 +++++-- nptl/tst-tls3mod.c | 4 ++-- nptl_db/thread_dbP.h | 2 +- nss/tst-nss-db-endpwent.c | 6 +++++- nss/tst-reload2.c | 6 +++++- posix/tst-chmod.c | 9 ++++++-- posix/tst-execl2.c | 4 ++-- posix/tst-execle2.c | 4 ++-- posix/tst-execlp2.c | 7 +++---- posix/tst-execv2.c | 3 +-- posix/tst-execve2.c | 3 +-- posix/tst-execvp2.c | 6 ++---- posix/tst-getopt-cancel.c | 2 +- posix/tst-nice.c | 3 +-- posix/wordexp-test.c | 12 +++++++++-- rt/tst-cpuclock2.c | 2 +- rt/tst-cputimer1.c | 2 +- rt/tst-cputimer2.c | 2 +- rt/tst-cputimer3.c | 2 +- stdio-common/bug12.c | 15 +++++++++----- stdio-common/bug19.c | 9 ++++++-- stdio-common/bug3.c | 6 +++++- stdio-common/bug4.c | 6 +++++- stdio-common/bug5.c | 6 +++++- stdio-common/bug6.c | 8 +++---- stdio-common/test-fwrite.c | 8 +++++-- stdio-common/test_rdwr.c | 3 ++- stdio-common/tst-cookie.c | 4 +++- stdio-common/tst-fmemopen3.c | 6 +++++- stdio-common/tst-fseek.c | 3 +-- stdio-common/tst-perror.c | 6 +++++- stdio-common/tstscanf.c | 14 +++++++++++-- stdlib/test-canon.c | 25 ++++++++++++++++++---- sunrpc/netname.c | 3 ++- support/test-container.c | 18 +++++++++------- sysdeps/pthread/eintr.c | 4 ++-- sysdeps/pthread/tst-cancel11.c | 6 +++++- sysdeps/pthread/tst-cancel16.c | 6 +++++- sysdeps/pthread/tst-cancel20.c | 2 -- sysdeps/pthread/tst-cancel21.c | 2 -- sysdeps/pthread/tst-cancel4.c | 6 ++++-- sysdeps/pthread/tst-cancel6.c | 3 ++- sysdeps/pthread/tst-cond18.c | 2 +- sysdeps/pthread/tst-fini1mod.c | 6 +++++- sysdeps/pthread/tst-flock1.c | 6 +++++- sysdeps/pthread/tst-flock2.c | 6 +++++- sysdeps/pthread/tst-key1.c | 10 ++++----- sysdeps/pthread/tst-signal1.c | 6 +++++- sysdeps/pthread/tst-signal2.c | 6 +++++- sysdeps/pthread/tst-timer.c | 2 +- time/tst-cpuclock1.c | 2 +- 84 files changed, 434 insertions(+), 176 deletions(-)