Kaleb S. KEITHLEY fd8f712f31 core (named threads): flood of -Wformat-truncation warnings with gcc-7.1
Starting in Fedora 26 which has gcc-7.1.x, -Wformat-trunction is enabled
with -Wformat, resulting in a flood of new warnings. This many warnings
is a concern because it makes it hard(er) to see other warnings that
should be addressed.

An example is at
https://kojipkgs.fedoraproject.org//packages/glusterfs/3.12.0/1.fc28/data/logs/x86_64/build.log

For more info see https://review.gluster.org/#/c/18267/

I can't find much (or good) documentation on the heuristics the
compiler uses for this warning. In the case of printing integer types
it appears it looks at the available space in the destination and the
range of values for the variable and/or its type.

To address the specific question about why 0x3ff versus 0xfff to mask
the value, either would suffice to hint to the compiler that the
printed value will fit in three characters. But the loop is from
0...1023 (or 0...0x3ff if you prefer) so I chose that as a more
"accurate" mask to use as it exactly matches the range of values of
the loop.

Fixes: bz#1492847
Change-Id: I6e309ba42159841131d8241bfc0566ef09e00aa9
2018-07-23 03:01:10 +00:00
2010-03-12 04:09:34 -08:00
2018-07-10 16:28:24 +02:00
2017-09-07 11:42:08 +00:00
2017-11-08 11:10:44 +00:00
2018-06-21 05:41:47 +00:00
2011-07-18 17:24:14 +05:30
2017-09-07 11:42:08 +00:00
2014-09-16 02:30:36 -07:00

Gluster

Gluster is a software defined distributed storage that can scale to several petabytes. It provides interfaces for object, block and file storage.

Development

Contributions to gluster in the form of patches and new feature additions can be made by following steps outlined at Developers Guide.

Documentation

The Gluster documentation can be found at Gluster Docs.

Deployment

Quick instructions to build and install can be found in INSTALL file.

Maintainers

The list of Gluster maintainers is available in MAINTAINERS file.

License

Gluster is dual licensed under GPLV2 and LGPLV3+.

Please visit the Gluster Home Page to find out more about Gluster.

Description
No description provided
Readme 86 MiB
Languages
C 86.6%
Shell 7.5%
Python 3.6%
Perl 0.7%
Makefile 0.4%
Other 0.9%