提交 1afaafe3 编写于 作者: M Matthias Bolte 提交者: Eric Blake

esx: Fix gcc 4.6 warning about initialized but unused variables

This warnings come from partly generated code. Therefore, the best
solution is to mark them as potentially being unused using the
ATTRIBUTE_UNUSED macro. This is suggested by the gcc documentation.

Reported by Christophe Fergeau
上级 d934bd0a
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
void \ void \
esxVI_##_type##_Free(esxVI_##_type **ptrptr) \ esxVI_##_type##_Free(esxVI_##_type **ptrptr) \
{ \ { \
esxVI_##_type *item = NULL; \ esxVI_##_type *item ATTRIBUTE_UNUSED; \
\ \
if (ptrptr == NULL || *ptrptr == NULL) { \ if (ptrptr == NULL || *ptrptr == NULL) { \
return; \ return; \
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
void \ void \
esxVI_##_type##_Free(esxVI_##_type **ptrptr) \ esxVI_##_type##_Free(esxVI_##_type **ptrptr) \
{ \ { \
esxVI_##_type *item = NULL; \ esxVI_##_type *item ATTRIBUTE_UNUSED; \
\ \
if (ptrptr == NULL || *ptrptr == NULL) { \ if (ptrptr == NULL || *ptrptr == NULL) { \
return; \ return; \
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
esxVI_##_type##_Cast##_dest_extra##FromAnyType(esxVI_AnyType *anyType, \ esxVI_##_type##_Cast##_dest_extra##FromAnyType(esxVI_AnyType *anyType, \
_dest_type **ptrptr) \ _dest_type **ptrptr) \
{ \ { \
_dest_type *item; \ _dest_type *item ATTRIBUTE_UNUSED; \
\ \
if (anyType == NULL || ptrptr == NULL || *ptrptr != NULL) { \ if (anyType == NULL || ptrptr == NULL || *ptrptr != NULL) { \
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", \ ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s", \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册