[libvirt] [PATCH] maint: update to latest gnulib

Eric Blake eblake at redhat.com
Tue May 26 16:52:33 UTC 2015


Time to update to new gnulib before a release.

gcc 5.1 introduced a new -Wformat-signedness, and new gnulib now
turns it on by default.  However, it is still rather lame at the
moment, because it warns for enums, even though there is no way
to control the signeness of an enum which does not use any members
that are negative or larger than INT_MAX, and even though such an
enum would always print the same for both %d and %u:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66249

In file included from ../../src/util/virarch.c:26:0:
../../src/util/virarch.c: In function 'virArchFromHost':
../../src/util/virarch.c:180:15: error: format '%d' expects argument of type 'int', but argument 9 has type 'unsigned int' [-Werror=format=]
     VIR_DEBUG("Mapped %s to %d (%s)",

So this patch turns off the new warning as part of enabling all
other new gcc 5.1 warnings that gnulib now enables.

* .gnulib: Update to latest, in part for gcc 5.1 interaction.
* m4/virt-compile-warnings.m4: Ignore -Wformat-signedness, for now.

Signed-off-by: Eric Blake <eblake at redhat.com>
---

It looks like DV hasn't done the freeze yet, so I'll push this under
the gnulib rule. I still have a pending gnulib patch that helps the
build under rawhide mingw (where newer gcc broke how older gnulib
was probing for whether PRIdMAX was "lld" vs. "I64d"); that may miss
the freeze, but my goal in pushing this now is that if it is the only
gnulib change post-freeze, then we are minimizing the risk on other
platforms by getting the rest picked up now.

* .gnulib 106a386...875ec93 (34):
> autoupdate
> gitlog-to-changelog: parse "Tiny-change"
> update from texinfo
> doc: document glibc posix_fallocate() issues
> gendocs.sh: document new htmlarg default
> extern-inline: no need for workaround in GCC 5.1
> update from texinfo
> eealloc, pagealign_alloc, xalloc: avoid clang warnings
> tests: pacify GCC 5.1's stricter printf checking
> fts: port to GCC 5.1 with --enable-gcc-warnings
> file-has-acl: port to CentOS 6
> file-has-acl: always return false when ACLs aren't supported
> gettext: propagate po/Makefile.in.in too
> file-has-acl: new module, split from acl
> manywarnings: add GCC 5.1 warnings
> autoupdate
> doc: update FDL template to match FDL examples.
> lstat: fix cross-compilation 'ln -s' problem
> gendocs.sh: default to a common CSS style sheet for HTML output
> gnulib-tool: output bold attribute more portably
> qacl: Simplify HP-UX acl_nontrivial check
> acl: On Linux, check for acls without libacl
> acl, qacl: split off shared functions into separate object file
> git-version-gen: revert "detect untagged revisions"
> tempname: avoid unused parameter warnings
> git-version-gen: detect untagged revisions
> fseeko: fix build failure on NetBSD >= 6
> gitlog-to-changelog: port to MS-Windows
> gendocs: new option --tex for texi2dvi options
> sync gettext .m4 files from gettext
> uniname/uniname-tests: fix failure due to alias
> hash: remove deprecated hash_insert0 function
> mountlist: remove dependency on libmount
> stddef: port to pre-C11 GCC on x86

 .gnulib                     | 2 +-
 m4/virt-compile-warnings.m4 | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gnulib b/.gnulib
index 106a386..875ec93 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 106a3866d01f9dd57ab4f10dbeb0d5a8db73a9f7
+Subproject commit 875ec93e1501d2d2a8bab1b64fa66b8ceb51dc67
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index 8aebdb0..3dd0665 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -59,6 +59,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
     dontwarn="$dontwarn -Waggregate-return"
     # gcc 4.4.6 complains this is C++ only; gcc 4.7.0 implies this from -Wall
     dontwarn="$dontwarn -Wenum-compare"
+    # gcc 5.1 -Wformat-signedness mishandles enums, not ready for prime time
+    dontwarn="$dontwarn -Wformat-signedness"

     # gcc 4.2 treats attribute(format) as an implicit attribute(nonnull),
     # which triggers spurious warnings for our usage
-- 
2.1.0




More information about the libvir-list mailing list