freecalypso-tools: fix -Werror=format-security in get_pirelli_imei()

Vadim Yanitskiy axilirator at gmail.com
Thu May 23 17:06:46 UTC 2024


Hi Mychaela,

I am currently updating the PKGBUILDs for the FreeCalypso packages I 
maintain.  While doing so, I faced a -Werror=format-security problem in 
the freecalypso-tools repository.  Please find a patch attached.

pirimei.c: In function ‘get_pirelli_imei’:
pirimei.c:33:24: error: format not a string literal and no format 
arguments [-Werror=format-security]
    33 |                 printf(failmsg);
       |                        ^~~~~~~

It does not look critical to me, as the argument we pass to printf() is 
a static string and not an externally provided input.  But still, let's 
make the compiler happy, so that one can build the project with default 
distribution's CFLAGS, which in my case include '-Wformat 
-Werror=format-security'.

-- 
Best regards,
Vadim.


More information about the Community mailing list