From patchwork Thu Nov 5 09:38:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 40961 Return-Path: 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 3F2943851C08; Thu, 5 Nov 2020 09:40:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F2943851C08 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604569223; bh=RT7M3TFtaUgdSHwAJGcdKvCitWJM+nukYQ2xRsFBOYM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=c8CC5IAWL/SjRgZJPQBfBmemcPUliTm1WorZOU4JueLb47N07xe/q1UPtuUbR/ZaF 56Dj7FJegHk1epp/a1QlBKufYXEC7kkG8Z8M9zQu/sABmfWXEfeGE5RoVgzLSVvdFn W8OXD67QysRLQnsAHzb00Fjtj8iqlGZcJPO9yWa4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dog.birch.relay.mailchannels.net (dog.birch.relay.mailchannels.net [23.83.209.48]) by sourceware.org (Postfix) with ESMTPS id B0F6F3857C7E for ; Thu, 5 Nov 2020 09:40:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B0F6F3857C7E 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 287A5541C23; Thu, 5 Nov 2020 09:40:19 +0000 (UTC) Received: from pdx1-sub0-mail-a72.g.dreamhost.com (100-96-8-79.trex.outbound.svc.cluster.local [100.96.8.79]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id A5674541A36; Thu, 5 Nov 2020 09:40:16 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a72.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); Thu, 05 Nov 2020 09:40:19 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Lonely-Drop: 462d2b0820a27540_1604569218976_554449471 X-MC-Loop-Signature: 1604569218976:2750255933 X-MC-Ingress-Time: 1604569218976 Received: from pdx1-sub0-mail-a72.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a72.g.dreamhost.com (Postfix) with ESMTP id 3DFF67E38E; Thu, 5 Nov 2020 01:40:16 -0800 (PST) Received: from rhbox.redhat.com (unknown [123.252.202.172]) (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-a72.g.dreamhost.com (Postfix) with ESMTPSA id 5CF557E0B8; Thu, 5 Nov 2020 01:40:13 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a72 To: libc-alpha@sourceware.org Subject: [PATCH v2] Remove __warndecl Date: Thu, 5 Nov 2020 15:08:51 +0530 Message-Id: <20201105093851.72115-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <87lffg1756.fsf@oldenburg2.str.redhat.com> References: <87lffg1756.fsf@oldenburg2.str.redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_SHORT, 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-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: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" The macro is not used anymore, so remove it and warning-nop.c. --- 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 = backtrace backtracesyms backtracesymsfd noophooks \ explicit_bzero_chk \ stack_chk_fail fortify_fail \ $(static-only-routines) -static-only-routines := warning-nop stack_chk_fail_local +static-only-routines := stack_chk_fail_local # Don't add stack_chk_fail_local.o to libc.a since __stack_chk_fail_local # 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_hidden; \ - 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 86906c2478..e94d09d7dd 100644 --- a/misc/sys/cdefs.h +++ b/misc/sys/cdefs.h @@ -128,13 +128,10 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) #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