Re: [BUG] sparse warning EXPORT_SYMBOL()'d symbol non-static

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

 



On Sun, 2013-11-24 at 12:45 -0800, Josh Triplett wrote:
> On Sun, Nov 24, 2013 at 12:28:51PM -0800, Andi Kleen wrote:
> > > Well, sparse is clearly "right", for all it cares it might very well be
> > > static, but it seems this is necessary for something in the kernel and
> > > we clearly can't forward-declare it in a header file. Perhaps we can add
> > > some annotation to say
> > > "__attribute__((yes_I_know_but_really_dont_want_this_to_be_static))" to
> > > suppress this warning? This is getting annoying to me as well :-)
> > 
> > We could do something like
> > 
> > typeof(foo); 
> > 
> > in the macro. Not sure if that would make sparse happy.
> 
> If you're just looking to mollify sparse,

I am, pretty much, since now I get a ton of output and have to either
grep it or dig through it... :)

> the easiest way is to
> put a prototype of the symbol right before the symbol itself.

Oh, right, good point, thanks Josh. Andi, do you want to do that?
Otherwise I can post a patch.

johannes

--
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