bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build fails with flex 2.6.4 and -Werror


From: Andrei Borzenkov
Subject: Re: Build fails with flex 2.6.4 and -Werror
Date: Sun, 4 Jun 2017 20:47:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

04.06.2017 20:05, Timotej Lazar пишет:
> Hi,
> 
> Building GRUB using the default configuration (-Werror -Wunused-value)
> fails with flex >2.6.3.
> 

flex bug fixed in flex git.

https://github.com/westes/flex/issues/162

> The problem is with the script lexer, which defines fprintf to 0. The
> replacement triggers -Wunused-value in the default flex template for
> yy_fatal_error. In previous versions of the template the fprintf call
> was cast to void, which silenced the warning. However, the cast was
> removed in the latest version of flex.
> 
> I’m attaching a patch to fix this by replacing fprintf with grub_printf
> instead. Alternatively, fprintf could be #defined to ((void)0), but that
> might break if the flex template changes to not ignore the return value.
> Another option would be to add a #pragma in yylex.l to ignore unused
> values. In any case, the lexer overrides yy_fatal_error, so this code is
> never actually executed, only compiled.
> 
> Thanks,
> Timotej Lazar
> 
> 
> 
> _______________________________________________
> Bug-grub mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-grub
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]