From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1667044704; bh=ulcbz61hgoUmKcPyxgt2/c5+gl9iM2HuFl5tuzPRRNw=; h=Message-ID:Date:Mime-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=rzG58IYjDVFBqGaIha2SsBqhsW5kDxHf6e6ESh6mE5VJbrb3vtBaqmt2WCXsEceKG 4VXMRkp8Vi9VreU92lR2gP1X0P2+fK5RLIThCplBAmCPSjYJxNkBYQ44N0AyNPcJE5 YWqA4gypMePPwej+fRYIMKt3KwHJ2mV2gd3O1WxQ= 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 Cc: gdb-patches@sourceware.org References: <568d957b97fadfee53f3450dfd083ca895d1f0bf.1666258361.git.research_trasio@irq.a4lg.com> <87y1t56v6p.fsf@redhat.com> From: Tsukasa OI In-Reply-To: <87y1t56v6p.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 >