Re: [PATCH v2] grub-install: locale depends on nls

2018-03-08 Thread Daniel Kiper
On Wed, Mar 07, 2018 at 10:54:28PM +0100, Olaf Hering wrote: > Am Wed, 7 Mar 2018 22:30:53 +0100 > schrieb Daniel Kiper : > > > Sorry, I do not like it. Please use "__attribute__ ((unused))" for the > > function > > arguments and put #if/#endif around its whole body. > > It is not just this functi

Re: [PATCH v2] grub-install: locale depends on nls

2018-03-07 Thread Olaf Hering
Am Wed, 7 Mar 2018 22:30:53 +0100 schrieb Daniel Kiper : > Sorry, I do not like it. Please use "__attribute__ ((unused))" for the > function > arguments and put #if/#endif around its whole body. It is not just this function body, many more parts will be unneeded. Really polluted the entire file

Re: [PATCH v2] grub-install: locale depends on nls

2018-03-07 Thread Daniel Kiper
On Tue, Mar 06, 2018 at 09:05:26AM +0100, Olaf Hering wrote: > With --disable-nls no locales exist. > > Avoid runtime error by moving code that copies locales into its own > function. Return early in case nls was disabled. That way the compiler > will throw away unreachable code, no need to put pre

[PATCH v2] grub-install: locale depends on nls

2018-03-06 Thread Olaf Hering
With --disable-nls no locales exist. Avoid runtime error by moving code that copies locales into its own function. Return early in case nls was disabled. That way the compiler will throw away unreachable code, no need to put preprocessor conditionals everywhere to avoid warnings about unused code.