Re: sparse: new feature " multiple initializers" has false positives on MODULE_ALIAS

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

 



On Thu, Jan 22, 2015 at 12:31 PM, Christian Borntraeger
<borntraeger@xxxxxxxxxx> wrote:
> Linus, Christopher,
>
> Commit  0f25c6a78e08fdc15af5e599d836fa24349c042f ("Add warning about duplicate initializers") has a false positive on arch/s390/kvm/kvm-s390.c
>
>   CHECK   arch/s390/kvm/kvm-s390.c
> arch/s390/kvm/kvm-s390.c:1823:1: error: symbol '__UNIQUE_ID_alias__COUNTER__' has multiple initializers (originally initialized at arch/s390/kvm/kvm-s390.c:1822)

Search the "__COUNTER__" macro shows that:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

__COUNTER__This macro expands to sequential integral values starting
from 0. In conjunction with the ## operator, this provides a
convenient means to generate unique identifiers. Care must be taken to
ensure that __COUNTER__ is not expanded prior to inclusion of
precompiled headers which use it. Otherwise, the precompiled headers
will not be used.

I think sparse haven't implement the __COUNTER__ macro. That is why it emit the
error on duplicate entry.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux