Mailinglist Archive: yast-commit (436 mails)

< Previous Next >
[yast-commit] [yast/yast-devtools] e2d5a4: Use -Wno-format-nonliteral (bsc#982942)
Branch: refs/heads/no-format-nonliteral
Home: https://github.com/yast/yast-devtools
Commit: e2d5a47a41b246087adeb976741468c6d608d712

https://github.com/yast/yast-devtools/commit/e2d5a47a41b246087adeb976741468c6d608d712
Author: Martin Vidner <mvidner@xxxxxxx>
Date: 2017-10-10 (Tue, 10 Oct 2017)

Changed paths:
M build-tools/scripts/y2autoconf

Log Message:
-----------
Use -Wno-format-nonliteral (bsc#982942)

This, together with a new round of cleanup in yast2-core,
makes that package build even with Werror.

The warnings lost in this way are these:

```console
[ 138s] IniParser.cc: In member function 'int
IniParser::write_helper(IniSection&, std::ofstream&, int)':
[ 138s] IniParser.cc:1069:84: warning: format not a string literal, argument
types not checked [-Wformat-nonliteral]
[ 138s] out_buffer = format (sections[readby].begin.out.c_str (),
ini.getName());
[ 138s]
^
[ 138s] IniParser.cc:1093:91: warning: format not a string literal, argument
types not checked [-Wformat-nonliteral]
[ 138s] out_buffer = format (params[e.getReadBy ()].line.out.c_str (),
e.getName(), val.c_str());
[ 138s]
^
[ 138s] IniParser.cc:1104:75: warning: format not a string literal, argument
types not checked [-Wformat-nonliteral]
[ 138s] out_buffer = format (sections[readby].end.out.c_str (),
ini.getName());
[ 138s]
^
[ 138s] IniParser.cc: In member function 'std::__cxx11::string
IniParser::getFileName(const string&, int) const':
[ 138s] IniParser.cc:1116:54: warning: format not a string literal, argument
types not checked [-Wformat-nonliteral]
[ 138s] file = format(rewrites[rb].out.c_str (), sec.c_str());
[ 138s] ^
```

We are indeed using a non-constant format string, one read from the *.scr file
such as "%s = %s".
The format strings are coming from our own configuration files.


Commit: c03ed6eeff9f085f4f195b3fbd1e1d4aafbaf589

https://github.com/yast/yast-devtools/commit/c03ed6eeff9f085f4f195b3fbd1e1d4aafbaf589
Author: Martin Vidner <mvidner@xxxxxxx>
Date: 2017-10-10 (Tue, 10 Oct 2017)

Changed paths:
M package/yast2-devtools.changes
M package/yast2-devtools.spec

Log Message:
-----------
version + changelog


Compare:
https://github.com/yast/yast-devtools/compare/e2d5a47a41b2^...c03ed6eeff9f
< Previous Next >
This Thread