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

2015-03-04 Thread Ian Romanick
On 02/28/2015 10:33 AM, Ilia Mirkin wrote: On Sat, Feb 28, 2015 at 1:26 PM, Carl Worth cwo...@cworth.org wrote: On Fri, Feb 27 2015, Ian Romanick wrote: All dd functions take a gl_context as the first parameter. Instead of removing it, just silence the warning. For code using gcc, I really

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

2015-02-28 Thread Carl Worth
On Fri, Feb 27 2015, Ian Romanick wrote: All dd functions take a gl_context as the first parameter. Instead of removing it, just silence the warning. For code using gcc, I really prefer the __attribute__((__unused__)) style, (though, obviously hidden in a reasonable looking macro). That

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

2015-02-28 Thread Ilia Mirkin
On Sat, Feb 28, 2015 at 1:51 PM, Jan Vesely jan.ves...@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!

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

2015-02-28 Thread Jan Vesely
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.

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

2015-02-28 Thread Carl Worth
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. -Carl pgpHapVflSAmW.pgp Description: PGP signature

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

2015-02-28 Thread Ilia Mirkin
On Sat, Feb 28, 2015 at 1:26 PM, Carl Worth cwo...@cworth.org wrote: On Fri, Feb 27 2015, Ian Romanick wrote: All dd functions take a gl_context as the first parameter. Instead of removing it, just silence the warning. For code using gcc, I really prefer the __attribute__((__unused__))