提交 0ecc5ad7 编写于 作者: E Eric Blake

build: fix build with older gcc

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 f8e3221f.

* src/conf/domain_conf.c (virDomainDefParseXML): Mark large constants.
Signed-off-by: NEric Blake <eblake@redhat.com>
(cherry picked from commit f6817c70)
上级 3accd7eb
...@@ -10315,7 +10315,7 @@ virDomainDefParseXML(xmlDocPtr xml, ...@@ -10315,7 +10315,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (def->cputune.quota > 0 && if (def->cputune.quota > 0 &&
(def->cputune.quota < 1000 || (def->cputune.quota < 1000 ||
def->cputune.quota > 18446744073709551)) { def->cputune.quota > 18446744073709551LL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Value of cputune quota must be in range " _("Value of cputune quota must be in range "
"[1000, 18446744073709551]")); "[1000, 18446744073709551]"));
...@@ -10347,7 +10347,7 @@ virDomainDefParseXML(xmlDocPtr xml, ...@@ -10347,7 +10347,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (def->cputune.emulator_quota > 0 && if (def->cputune.emulator_quota > 0 &&
(def->cputune.emulator_quota < 1000 || (def->cputune.emulator_quota < 1000 ||
def->cputune.emulator_quota > 18446744073709551)) { def->cputune.emulator_quota > 18446744073709551LL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Value of cputune emulator_quota must be in range " _("Value of cputune emulator_quota must be in range "
"[1000, 18446744073709551]")); "[1000, 18446744073709551]"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册