resynthesizer icon indicating copy to clipboard operation
resynthesizer copied to clipboard

Fix format-security warning in debug.c

Open Freso opened this issue 1 year ago • 0 comments

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.

Freso avatar Apr 10 '24 16:04 Freso