Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Andrew Morton
On Fri, 12 Sep 2014 23:43:51 + "Rustad, Mark D" wrote: > Do you mean the number of warnings enabled, or the number of warning messages > being generated? The latter. My problem is I use crufty old compilers so a number of the warnings I see aren't seen by sane people and it' snot worth

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Rustad, Mark D
Michal, On Sep 12, 2014, at 4:37 PM, Michal Nazarewicz wrote: > On Fri, Sep 12 2014, Andrew Morton wrote: >> On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz >> wrote: >> >>> Because min and max macros use the same variable names no matter >>> how many times they are called (or how deep

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Rustad, Mark D
On Sep 12, 2014, at 3:40 PM, Andrew Morton wrote: > On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz > wrote: > >> Because min and max macros use the same variable names no matter >> how many times they are called (or how deep the nesting of their >> calls), each time min or max calls are

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Michal Nazarewicz
On Fri, Sep 12 2014, Andrew Morton wrote: > On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz > wrote: > >> Because min and max macros use the same variable names no matter >> how many times they are called (or how deep the nesting of their >> calls), each time min or max calls are nested,

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Andrew Morton
On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz wrote: > Because min and max macros use the same variable names no matter > how many times they are called (or how deep the nesting of their > calls), each time min or max calls are nested, the same variables > are declared. This is

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Andrew Morton
On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz min...@mina86.com wrote: Because min and max macros use the same variable names no matter how many times they are called (or how deep the nesting of their calls), each time min or max calls are nested, the same variables are declared. This

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Michal Nazarewicz
On Fri, Sep 12 2014, Andrew Morton a...@linux-foundation.org wrote: On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz min...@mina86.com wrote: Because min and max macros use the same variable names no matter how many times they are called (or how deep the nesting of their calls), each

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Rustad, Mark D
On Sep 12, 2014, at 3:40 PM, Andrew Morton a...@linux-foundation.org wrote: On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz min...@mina86.com wrote: Because min and max macros use the same variable names no matter how many times they are called (or how deep the nesting of their

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Rustad, Mark D
Michal, On Sep 12, 2014, at 4:37 PM, Michal Nazarewicz min...@mina86.com wrote: On Fri, Sep 12 2014, Andrew Morton a...@linux-foundation.org wrote: On Thu, 11 Sep 2014 23:39:36 +0200 Michal Nazarewicz min...@mina86.com wrote: Because min and max macros use the same variable names no

Re: [PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-12 Thread Andrew Morton
On Fri, 12 Sep 2014 23:43:51 + Rustad, Mark D mark.d.rus...@intel.com wrote: Do you mean the number of warnings enabled, or the number of warning messages being generated? The latter. My problem is I use crufty old compilers so a number of the warnings I see aren't seen by sane people

[PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-11 Thread Michal Nazarewicz
Because min and max macros use the same variable names no matter how many times they are called (or how deep the nesting of their calls), each time min or max calls are nested, the same variables are declared. This is especially noisy after min3 and max3 have been changed to nest min/max calls.

[PATCH 2/2] kernel.h: use __COUNTER__ in min and max macros to avoid -Wshadow warnings

2014-09-11 Thread Michal Nazarewicz
Because min and max macros use the same variable names no matter how many times they are called (or how deep the nesting of their calls), each time min or max calls are nested, the same variables are declared. This is especially noisy after min3 and max3 have been changed to nest min/max calls.