]> xenbits.xensource.com Git - libvirt.git/commitdiff
avoid 'sync' as variable name
authorPavel Hrdina <phrdina@redhat.com>
Mon, 19 May 2014 14:36:55 +0000 (16:36 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 19 May 2014 16:40:02 +0000 (18:40 +0200)
Old gcc complains about shadowing 'sync' variable:

../../src/qemu/qemu_agent.c: In function 'qemuAgentSetTime':
../../src/qemu/qemu_agent.c:1737: warning: declaration of 'sync'
  shadows a global declaration [-Wshadow]
/usr/include/unistd.h:464: warning: shadowed declaration is here
  [-Wshadow]

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_agent.c

index 10e2b8da8a748a6b14e6c6aea500a0df3e25b96e..04217339e1a8724fbb61ff9e2e4d5fc823f0299b 100644 (file)
@@ -1734,13 +1734,13 @@ int
 qemuAgentSetTime(qemuAgentPtr mon,
                 long long seconds,
                 unsigned int nseconds,
-                bool sync)
+                bool rtcSync)
 {
     int ret = -1;
     virJSONValuePtr cmd;
     virJSONValuePtr reply = NULL;
 
-    if (sync) {
+    if (rtcSync) {
         cmd = qemuAgentMakeCommand("guest-set-time", NULL);
     } else {
         /* guest agent expect time with nanosecond granularity.