From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Dw2LEXsVXWPo4REAWB0awg (envelope-from ) for ; Sat, 29 Oct 2022 07:58:51 -0400 Received: by simark.ca (Postfix, from userid 112) id 366F01E11E; Sat, 29 Oct 2022 07:58:51 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=aSkdmHOU; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D5B1A1E0D5 for ; Sat, 29 Oct 2022 07:58:50 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2E3438582A2 for ; Sat, 29 Oct 2022 11:58:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2E3438582A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667044729; bh=ulcbz61hgoUmKcPyxgt2/c5+gl9iM2HuFl5tuzPRRNw=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=aSkdmHOU602hoVOFTC98g/7Y1OZElryhKjtA7F+b+MGZPhtmY873JiWjdECteWD+5 x4VVE4VtsuUn4W8BkFhbmTAd/g8jLMMtyvj/S2rjKvW1oe1o/YO5fH5FKIUfOdQh/b U+v+9MWuYmN2hPiYW/NpgyTi8iY0NCMX7hdIWq6g= Received: from mail-sender-0.a4lg.com (mail-sender-0.a4lg.com [IPv6:2401:2500:203:30b:4000:6bfe:4757:0]) by sourceware.org (Postfix) with ESMTPS id EEABF3858C2D for ; Sat, 29 Oct 2022 11:58:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EEABF3858C2D Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 800D6300089; Sat, 29 Oct 2022 11:58:24 +0000 (UTC) Message-ID: <976ba1d3-94c8-102d-8c66-6e65cc469378@irq.a4lg.com> Date: Sat, 29 Oct 2022 20:58:23 +0900 Mime-Version: 1.0 Subject: Re: [PATCH 34/40] sim/rx: Mark unused function Content-Language: en-US To: Andrew Burgess References: <568d957b97fadfee53f3450dfd083ca895d1f0bf.1666258361.git.research_trasio@irq.a4lg.com> <87y1t56v6p.fsf@redhat.com> In-Reply-To: <87y1t56v6p.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Tsukasa OI via Gdb-patches Reply-To: Tsukasa OI Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022/10/25 1:30, Andrew Burgess wrote: > Tsukasa OI writes: > >> Clang generates a warning if there is a unused static function >> ("-Wunused-function"). On the default configuration, it causes a build >> failure (unless "--disable-werror" is specified). >> >> Although that this is completely unused, the author considers that this is >> _happened to be_ unused and choose to keep this function for now. > > What does "happen to be" mean? The function isn't used, right? Why did I say that? Perhaps I usually prefer symmetry. But since we can easily restore it, I agree to just remove the function. Thanks, Tsukasa > > I'd like to request this patch not be merged. I think the function > should just be deleted as unused. If/when there's a need for it, we can > just bring it back. > > Thanks, > Andrew > > > > >> >> Instead, this commit adds ATTRIBUTE_UNUSED. >> --- >> sim/rx/rx.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sim/rx/rx.c b/sim/rx/rx.c >> index 70b1b9729b7..8646c20d108 100644 >> --- a/sim/rx/rx.c >> +++ b/sim/rx/rx.c >> @@ -754,7 +754,7 @@ typedef union { >> float f; >> } FloatInt; >> >> -static inline int >> +static inline int ATTRIBUTE_UNUSED >> float2int (float f) >> { >> FloatInt fi; >> -- >> 2.34.1 >