On Fri, 2023-06-09 at 14:16 +0200, Torbjorn SVENSSON wrote:
> The only thing left, that I don't know how to handle, is the use of
> O() where the 3rd parameter is not a string literal.
> 
> src/job.c: In function 'create_batch_file':
> src/job.c:365:3: error: format not a string literal and no format
> arguments [-Werror=format-security]
>     O (fatal, NILF, error_string);
>     ^
> 
> is it okay to change this to: fatal (NILF, 0, error_string);
> or is there a better way to get around this warning?

I don't see how that change would get around this warning.  The result
after preprocessing is the same.  Did you try this and see the warning
go away?  That would be extremely odd.

To get rid of this warning you have to use this:

  OS (fatal, NILF, "%s", error_string);


Reply via email to