[Mesa-dev] [PATCH 5/6] i965: Silence unused parameter warning

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 28 10:59:00 PST 2015


On Sat, Feb 28, 2015 at 1:51 PM, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> On Sat, 2015-02-28 at 10:39 -0800, Carl Worth wrote:
>> On Sat, Feb 28 2015, Ilia Mirkin wrote:
>> > Another clean alternative is to leave the name of the variable out, i.e.
>> >
>> > function(struct gl_context *)
>>
>> Wow. Less is more! I hadn't realized that's a solution for this, but
>> it's really elegant.
>
> and it's also illegal in C (only allowed in C++)
> see 6.9.1 of c specs

Yeah... that's unfortunate. Come to think of it, did I only see this
in C++ code? Perhaps with gcc it works anyways? (Too lazy to test...)


More information about the mesa-dev mailing list