[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-patches
Subject: Re: [PATCH 34/40] sim/rx: Mark unused function
From: Tsukasa OI via Gdb-patches <gdb-patches () sourceware ! org>
Date: 2022-10-29 11:58:23
Message-ID: 976ba1d3-94c8-102d-8c66-6e65cc469378 () irq ! a4lg ! com
[Download RAW message or body]
On 2022/10/25 1:30, Andrew Burgess wrote:
> Tsukasa OI <research_trasio@irq.a4lg.com> 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
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic