Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/19/2016 12:47 PM, Emil Velikov wrote: > On 19 April 2016 at 20:35, Ian Romanick wrote: >> On 04/19/2016 12:32 PM, Chad Versace wrote: >>> On Tue 19 Apr 2016, Ian Romanick wrote: On 04/19/2016 12:15 PM, Chad Versace wrote: > On Tue 19 Apr 2016, Emil Velikov wrote: >> On 19 April

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Emil Velikov
On 19 April 2016 at 20:35, Ian Romanick wrote: > On 04/19/2016 12:32 PM, Chad Versace wrote: >> On Tue 19 Apr 2016, Ian Romanick wrote: >>> On 04/19/2016 12:15 PM, Chad Versace wrote: On Tue 19 Apr 2016, Emil Velikov wrote: > On 19 April 2016 at 19:38, Ian Romanick wrote: >> On 04/19

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/19/2016 12:32 PM, Chad Versace wrote: > On Tue 19 Apr 2016, Ian Romanick wrote: >> On 04/19/2016 12:15 PM, Chad Versace wrote: >>> On Tue 19 Apr 2016, Emil Velikov wrote: On 19 April 2016 at 19:38, Ian Romanick wrote: > On 04/19/2016 07:48 AM, Emil Velikov wrote: >> On 18 April

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Chad Versace
On Tue 19 Apr 2016, Ian Romanick wrote: > On 04/19/2016 12:15 PM, Chad Versace wrote: > > On Tue 19 Apr 2016, Emil Velikov wrote: > >> On 19 April 2016 at 19:38, Ian Romanick wrote: > >>> On 04/19/2016 07:48 AM, Emil Velikov wrote: > On 18 April 2016 at 19:01, Ian Romanick wrote: > > On

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/19/2016 12:15 PM, Chad Versace wrote: > On Tue 19 Apr 2016, Emil Velikov wrote: >> On 19 April 2016 at 19:38, Ian Romanick wrote: >>> On 04/19/2016 07:48 AM, Emil Velikov wrote: On 18 April 2016 at 19:01, Ian Romanick wrote: > On 04/18/2016 08:06 AM, Emil Velikov wrote: >> On 1

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/19/2016 11:47 AM, Emil Velikov wrote: > On 19 April 2016 at 19:38, Ian Romanick wrote: >> The only things in macros.h that are related and use lower case are >> likely, unlikely, unreachable, and assume. All four of those are lower >> case because they mimic keywords in some compiler. We d

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Chad Versace
On Tue 19 Apr 2016, Emil Velikov wrote: > On 19 April 2016 at 19:38, Ian Romanick wrote: > > On 04/19/2016 07:48 AM, Emil Velikov wrote: > >> On 18 April 2016 at 19:01, Ian Romanick wrote: > >>> On 04/18/2016 08:06 AM, Emil Velikov wrote: > On 18 April 2016 at 04:43, Francisco Jerez wrote:

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Emil Velikov
On 19 April 2016 at 19:38, Ian Romanick wrote: > On 04/19/2016 07:48 AM, Emil Velikov wrote: >> On 18 April 2016 at 19:01, Ian Romanick wrote: >>> On 04/18/2016 08:06 AM, Emil Velikov wrote: On 18 April 2016 at 04:43, Francisco Jerez wrote: > Grazvydas Ignotas writes: > >> On S

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/19/2016 07:48 AM, Emil Velikov wrote: > On 18 April 2016 at 19:01, Ian Romanick wrote: >> On 04/18/2016 08:06 AM, Emil Velikov wrote: >>> On 18 April 2016 at 04:43, Francisco Jerez wrote: Grazvydas Ignotas writes: > On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov > wrote:

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Ian Romanick
On 04/15/2016 06:00 PM, Grazvydas Ignotas wrote: > This is mostly for variables that are only used in asserts and cause > unused-but-set-variable warnings in release builds. Could just use > UNUSED directly, but MAYBE_UNUSED should be less confusing and is > similar to what the Linux kernel has. >

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Emil Velikov
On 18 April 2016 at 19:01, Ian Romanick wrote: > On 04/18/2016 08:06 AM, Emil Velikov wrote: >> On 18 April 2016 at 04:43, Francisco Jerez wrote: >>> Grazvydas Ignotas writes: >>> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov wrote: > On 16 April 2016 at 02:00, Grazvydas Ignotas

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-19 Thread Emil Velikov
On 18 April 2016 at 18:53, Francisco Jerez wrote: > Emil Velikov writes: > >> On 18 April 2016 at 04:43, Francisco Jerez wrote: >>> Grazvydas Ignotas writes: >>> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov wrote: > On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: >> Th

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-18 Thread Ian Romanick
On 04/18/2016 08:06 AM, Emil Velikov wrote: > On 18 April 2016 at 04:43, Francisco Jerez wrote: >> Grazvydas Ignotas writes: >> >>> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov >>> wrote: On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: > This is mostly for variables that are only

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-18 Thread Francisco Jerez
Emil Velikov writes: > On 18 April 2016 at 04:43, Francisco Jerez wrote: >> Grazvydas Ignotas writes: >> >>> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov >>> wrote: On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: > This is mostly for variables that are only used in asserts and

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-18 Thread Emil Velikov
On 18 April 2016 at 04:43, Francisco Jerez wrote: > Grazvydas Ignotas writes: > >> On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov >> wrote: >>> On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: This is mostly for variables that are only used in asserts and cause unused-but-set-varia

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-17 Thread Francisco Jerez
Grazvydas Ignotas writes: > On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov > wrote: >> On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: >>> This is mostly for variables that are only used in asserts and cause >>> unused-but-set-variable warnings in release builds. Could just use >>> UNUSED d

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-17 Thread Grazvydas Ignotas
On Sun, Apr 17, 2016 at 2:50 AM, Emil Velikov wrote: > On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: >> This is mostly for variables that are only used in asserts and cause >> unused-but-set-variable warnings in release builds. Could just use >> UNUSED directly, but MAYBE_UNUSED should be l

Re: [Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-16 Thread Emil Velikov
On 16 April 2016 at 02:00, Grazvydas Ignotas wrote: > This is mostly for variables that are only used in asserts and cause > unused-but-set-variable warnings in release builds. Could just use > UNUSED directly, but MAYBE_UNUSED should be less confusing and is > similar to what the Linux kernel has

[Mesa-dev] [PATCH 1/7] util: add MAYBE_UNUSED for config dependent variables

2016-04-15 Thread Grazvydas Ignotas
This is mostly for variables that are only used in asserts and cause unused-but-set-variable warnings in release builds. Could just use UNUSED directly, but MAYBE_UNUSED should be less confusing and is similar to what the Linux kernel has. And yes __attribute__((unused)) can be used on variables o