Description of problem: Recently, I got bug #1037377, where there are these errors: allmenus.cpp:367:69: error: format not a string literal and no format arguments [-Werror=format-security] allmenus.cpp:370:69: error: format not a string literal and no format arguments [-Werror=format-security] The offending lines (both) read: fprintf (stdout, bindtextdomain (PACKAGE, LOCALEDIR)); but PACKAGE and LOCALEDIR are constants defined by make, and to my best knowledge, a constant _is_ one of things that "string literal" stands for, so the error does not make any sense to me - I think it is a false positive. Version-Release number of selected component (if applicable): (ask dkholia about the environment) How reproducible: (haven't tried myself) Steps to Reproduce: 1. rebuild vodovod package with -Werror=format-security Actual results: allmenus.cpp:367:69: error: format not a string literal and no format arguments [-Werror=format-security] allmenus.cpp:370:69: error: format not a string literal and no format arguments [-Werror=format-security] njamfont.cpp:119:44: error: format not a string literal and no format arguments [-Werror=format-security] njamfont.cpp:128:44: error: format not a string literal and no format arguments [-Werror=format-security] Expected results: no errors Additional info:
Please attach preprocessed source.
Created attachment 857937 [details] allmenus.cpp preprocessed hope this is what are you asking for ...?
The warning is correct, the bindtextdomain function certainly isn't a format_arg attribute function like e.g. gettext, etc., so you should of course use "%s", bindtextdomain (...) instead.
sorry for the noise then and thanks for the explanation in the other (not-a-)bug (/me still doesn't understand what does it mean "like e.g. gettext", but whatever)