bootchk / resynthesizer

Suite of gimp plugins for texture synthesis
GNU General Public License v3.0
1.43k stars 163 forks source link

Fix format-security warning in debug.c #130

Open Freso opened 5 months ago

Freso commented 5 months ago

g_printerr() and related take an fprint() style format string as first parameter, followed by arguments for that fprint() format string – just a string was supplied here. As this function was only supplying a string, compilers would raise a format-security warning, which is commonly raised as an error (-Werror=format-security), stopping the compilation.

Additionally, g_printerr() “should not be used from within libraries.” Instead, it is being replaced here by the g_message() convenience macro, which also takes care of inserting newlines if needed.