]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
build: fix build with older gcc
authorEric Blake <eblake@redhat.com>
Tue, 28 May 2013 23:30:30 +0000 (17:30 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 29 May 2013 02:21:50 +0000 (20:21 -0600)
gcc 4.1.2 (hello, RHEL 5!) fails to build on 32-bit platforms with:

conf/domain_conf.c: In function 'virDomainDefParseXML':
conf/domain_conf.c:10581: warning: integer constant is too large for 'long' type

Problem introduced in commit f8e3221f9.

* src/conf/domain_conf.c (virDomainDefParseXML): Mark large constants.

Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit f6817c70b430c1cfdbdc7795cf09626c1fa810d8)

src/conf/domain_conf.c

index 15cd9b983dc589ea893b55f0fa8c06f357a5c1a9..4dc7d254232e8e1136bced50c22233ec201d89c1 100644 (file)
@@ -10315,7 +10315,7 @@ virDomainDefParseXML(xmlDocPtr xml,
 
     if (def->cputune.quota > 0 &&
         (def->cputune.quota < 1000 ||
-         def->cputune.quota > 18446744073709551)) {
+         def->cputune.quota > 18446744073709551LL)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("Value of cputune quota must be in range "
                          "[1000, 18446744073709551]"));
@@ -10347,7 +10347,7 @@ virDomainDefParseXML(xmlDocPtr xml,
 
     if (def->cputune.emulator_quota > 0 &&
         (def->cputune.emulator_quota < 1000 ||
-         def->cputune.emulator_quota > 18446744073709551)) {
+         def->cputune.emulator_quota > 18446744073709551LL)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                        _("Value of cputune emulator_quota must be in range "
                          "[1000, 18446744073709551]"));