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.
g_printerr()
and related take anfprint()
style format string as first parameter, followed by arguments for thatfprint()
format string – just a string was supplied here. As this function was only supplying a string, compilers would raise aformat-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 theg_message()
convenience macro, which also takes care of inserting newlines if needed.