[PATCH] build: fix build with older gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a9656af..2b4e160 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10578,7 +10578,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]"));
@@ -10610,7 +10610,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]"));
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]