]> xenbits.xensource.com Git - libvirt.git/commit
Format printf format specifier used with niothreadids
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 20 Feb 2017 18:24:06 +0000 (18:24 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 20 Feb 2017 18:24:06 +0000 (18:24 +0000)
commitf88b6e428578b6b7394059e120bd0d1c17bc7442
tree06179f51e03f4121ec88c8b6b2888693856bc43c
parent7f602b8291e97005b7533953e9b1470622e53eec
Format printf format specifier used with niothreadids

The niothreadids struct field is size_t, so must use %zu not %lu
with printf. While they're identical on some platforms, on others
they are different, causing warnings

conf/domain_conf.c: In function 'virDomainDefCheckABIStabilityFlags':
conf/domain_conf.c:19575:26: error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'size_t {aka unsigned int}' [-Werror=format=]
                        _("Target domain iothreads count %lu does not "
                          ^

conf/domain_conf.c: In function 'virDomainDefFormatInternal':
conf/domain_conf.c:23915:46: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t {aka unsigned int}' [-Werror=format=]
         virBufferAsprintf(buf, "<iothreads>%lu</iothreads>\n",
                                              ^

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/conf/domain_conf.c