Using a variable named 'stat' clashes with the system function
'stat()' causing compiler warnings on some platforms
cc1: warnings being treated as errors
../../src/qemu/qemu_monitor_text.c: In function 'parseMemoryStat':
../../src/qemu/qemu_monitor_text.c:604: error: declaration of 'stat' shadows a
global declaration [-Wshadow]
/usr/include/sys/stat.h:455: error: shadowed declaration is here [-Wshadow]
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
Pushed as a build fix.
src/qemu/qemu_monitor_text.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index a2a5885..bc83218 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -601,7 +601,7 @@ int qemuMonitorTextGetVirtType(qemuMonitorPtr mon,
static int parseMemoryStat(char **text, unsigned int tag,
- const char *search, virDomainMemoryStatPtr stat)
+ const char *search, virDomainMemoryStatPtr mstat)
{
char *dummy;
unsigned long long value;
@@ -625,8 +625,8 @@ static int parseMemoryStat(char **text, unsigned int tag,
case VIR_DOMAIN_MEMORY_STAT_AVAILABLE:
value >>= 10;
}
- stat->tag = tag;
- stat->val = value;
+ mstat->tag = tag;
+ mstat->val = value;
return 1;
}
return 0;
--
2.9.3