mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 10:55:19 +00:00
esx: silence spurious compiler warning
* src/esx/esx_vi_types.c (_DESERIALIZE_NUMBER) (ESX_VI__TEMPLATE__DESERIALIZE_NUMBER): Add range check to shut up gcc 4.5.0 regarding long long.
This commit is contained in:
parent
701f356ac6
commit
2c216d95e8
@ -333,7 +333,8 @@
|
|||||||
goto cleanup; \
|
goto cleanup; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
if (value < (_min) || value > (_max)) { \
|
if (((_min) != INT64_MIN && value < (_min)) \
|
||||||
|
|| ((_max) != INT64_MAX && value > (_max))) { \
|
||||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
|
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
|
||||||
"Value '%s' is not representable as "_xsdType, \
|
"Value '%s' is not representable as "_xsdType, \
|
||||||
(const char *)string); \
|
(const char *)string); \
|
||||||
@ -922,7 +923,8 @@ esxVI_AnyType_Deserialize(xmlNodePtr node, esxVI_AnyType **anyType)
|
|||||||
goto failure; \
|
goto failure; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
if (number < (_min) || number > (_max)) { \
|
if (((_min) != INT64_MIN && number < (_min)) \
|
||||||
|
|| ((_max) != INT64_MAX && number > (_max))) { \
|
||||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
|
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, \
|
||||||
_("Value '%s' is out of %s range"), \
|
_("Value '%s' is out of %s range"), \
|
||||||
(*anyType)->value, _xsdType); \
|
(*anyType)->value, _xsdType); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user