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
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-grub
> 


_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to