Re: [PATCH 06/16] bcache: Suppress more warnings about set-but-not-used variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-03-16 at 00:20 +0800, Coly Li wrote:
> On 15/03/2018 11:08 PM, Bart Van Assche wrote:
> > This patch does not change any functionality.
> > 
> > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
> 
> Hi Bart,
> 
> This patch looks good to me. A question is, does GCC later than 4.3
> supports such annotation like '__maybe_unused' ?

Hello Coly,

You may want to have a look at the following commit:

commit 0d7ebbbc6eaa5539f78ab20ed6ff1725a4e332ef
Author: David Rientjes <rientjes@xxxxxxxxxx>
Date:   Wed May 9 02:35:27 2007 -0700

    compiler: introduce __used and __maybe_unused

    __used is defined to be __attribute__((unused)) for all pre-3.3 gcc
    compilers to suppress warnings for unused functions because perhaps they
    are referenced only in inline assembly.  It is defined to be
    __attribute__((used)) for gcc 3.3 and later so that the code is still
    emitted for such functions.



Thanks,

Bart.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux