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.


��.n��������+%������w��{.n�����{���{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux