Re: [patch 01/10] compiler: define __attribute_unused__

Adrian Bunk
2007-05-03T19:05:24Z

On Thu, May 03, 2007 at 11:56:34AM -0700, David Rientjes wrote:
> On Thu, 3 May 2007, Adrian Bunk wrote:
>
> > > That's only addressing part of the issue. What about automatic or static
> > > external variables that are declared but may go unreferenced depending on
> >
> > This is only about static code. For non-static code it would be
> > impossible for gcc to issue warnings.
>
> static external variables are certainly still static code and gcc issues
> the proper warnings if I do:
>
> static struct bootnode nodes[MAX_NUMNODES];
>
> and I never reference nodes.

No disagreement.

But you said:
What about automatic or static external variables that are declared but ...

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed