This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Jeffrey.Walton, martin.panter, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2016-07-26.09:47:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469526458.69.0.577420829967.issue20948@psf.upfronthosting.co.za>
In-reply-to
Content
GCC’s -Wformat options are documented at <https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-321>. We already enable -Wall by default, which implicitly enables -Wformat, but not -Wformat=2. Apparently, -Wformat=2 enables -Wformat-security, so you shouldn’t have to manually enable it.

The -Wformat-security option enables warnings for stuff like printf(variable), without any extra arguments. Such a call could easily be changed, even if it is not a genuine problem. So I wouldn’t have a problem enabling this warning by default. (See also Issue 23545 proposing a few other warnings.)

However I am not convinced it is worth working around the -Wformat-nonliteral warnings, given that all the warnings given above were false positives, and the general workaround would need six or seven preprocessor lines.
History
Date User Action Args
2016-07-26 09:47:38martin.pantersetrecipients: + martin.panter, pitrou, vstinner, python-dev, serhiy.storchaka, Jeffrey.Walton
2016-07-26 09:47:38martin.pantersetmessageid: <1469526458.69.0.577420829967.issue20948@psf.upfronthosting.co.za>
2016-07-26 09:47:38martin.panterlinkissue20948 messages
2016-07-26 09:47:38martin.pantercreate