From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from quail.birch.relay.mailchannels.net (quail.birch.relay.mailchannels.net [23.83.209.151]) by sourceware.org (Postfix) with ESMTPS id 16471384A02B for ; Tue, 10 Nov 2020 14:37:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 16471384A02B X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7619332149B; Tue, 10 Nov 2020 14:37:36 +0000 (UTC) Received: from pdx1-sub0-mail-a5.g.dreamhost.com (100-100-138-38.trex.outbound.svc.cluster.local [100.100.138.38]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id C25B83216F5; Tue, 10 Nov 2020 14:37:34 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a5.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.10); Tue, 10 Nov 2020 14:37:36 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Tangy-Bitter: 0f4734b503149cb7_1605019056133_2333024579 X-MC-Loop-Signature: 1605019056133:1124947878 X-MC-Ingress-Time: 1605019056133 Received: from pdx1-sub0-mail-a5.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a5.g.dreamhost.com (Postfix) with ESMTP id 6108A7E657; Tue, 10 Nov 2020 06:37:34 -0800 (PST) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a5.g.dreamhost.com (Postfix) with ESMTPSA id AED507E5FC; Tue, 10 Nov 2020 06:37:32 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a5 From: Siddhesh Poyarekar To: libc-stable@sourceware.org Cc: Florian Weimer Subject: [COMMITTED 2.32] Remove __warndecl Date: Tue, 10 Nov 2020 20:07:15 +0530 Message-Id: <20201110143715.191638-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110143715.191638-1-siddhesh@sourceware.org> References: <20201110143715.191638-1-siddhesh@sourceware.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2020 14:37:40 -0000 The macro is not used anymore, so remove it and warning-nop.c. Reviewed-by: Florian Weimer (cherry-picked from 34aec973e15a81926198f4b71ff99081dff87a92) --- debug/Makefile | 2 +- debug/warning-nop.c | 70 --------------------------------------------- misc/sys/cdefs.h | 3 -- 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 debug/warning-nop.c diff --git a/debug/Makefile b/debug/Makefile index 3a60d7af7a..0036edd187 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -51,7 +51,7 @@ routines =3D backtrace backtracesyms backtracesymsfd n= oophooks \ explicit_bzero_chk \ stack_chk_fail fortify_fail \ $(static-only-routines) -static-only-routines :=3D warning-nop stack_chk_fail_local +static-only-routines :=3D stack_chk_fail_local =20 # Don't add stack_chk_fail_local.o to libc.a since __stack_chk_fail_loca= l # is an alias of __stack_chk_fail in stack_chk_fail.o. diff --git a/debug/warning-nop.c b/debug/warning-nop.c deleted file mode 100644 index 4ab7e182b7..0000000000 --- a/debug/warning-nop.c +++ /dev/null @@ -1,70 +0,0 @@ -/* Dummy nop functions to elicit link-time warnings. - Copyright (C) 2005-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include - -static void -__attribute__ ((used)) -nop (void) -{ -} - -/* Don't insert any other #include's before this #undef! */ - -#undef __warndecl -#define __warndecl(name, msg) \ - extern void name (void) __attribute__ ((alias ("nop"))) attribute_hidd= en; \ - link_warning (name, msg) - -#undef __USE_FORTIFY_LEVEL -#define __USE_FORTIFY_LEVEL 99 - -/* Following here we need an #include for each public header file - that uses __warndecl. */ - -/* Define away to avoid warnings with compilers that do not have these - builtins. */ -#define __builtin___memcpy_chk(dest, src, len, bos) NULL -#define __builtin___memmove_chk(dest, src, len, bos) NULL -#define __builtin___mempcpy_chk(dest, src, len, bos) NULL -#define __builtin___memset_chk(dest, ch, len, bos) NULL -#define __builtin___stpcpy_chk(dest, src, bos) NULL -#define __builtin___strcat_chk(dest, src, bos) NULL -#define __builtin___strcpy_chk(dest, src, bos) NULL -#define __builtin___strncat_chk(dest, src, len, bos) NULL -#define __builtin___strncpy_chk(dest, src, len, bos) NULL -#define __builtin_object_size(bos, level) 0 - -#include diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h index 19d9cc5cfe..38221d0b2a 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -124,13 +124,10 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) =20 #if __GNUC_PREREQ (4,3) -# define __warndecl(name, msg) \ - extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else -# define __warndecl(name, msg) extern void name (void) # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif --=20 2.26.2