]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
xen: fix build error on rhel-5
authorPavel Hrdina <phrdina@redhat.com>
Tue, 14 Apr 2015 12:41:56 +0000 (14:41 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 14 Apr 2015 13:14:58 +0000 (15:14 +0200)
../../src/xen/block_stats.c:82: warning: dereferencing type-punned
    pointer will break strict-aliasing rules [-Wstrict-aliasing]

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

index e1e10a2f9152658a736ffe9170cdb169c2b57ddb..a1ffc2124340c637b3d49d91f7fc74f40b0181c6 100644 (file)
@@ -63,7 +63,7 @@ static int64_t
 read_stat(const char *path)
 {
     char str[64];
-    int64_t r;
+    long long r;
     size_t i;
     FILE *fp;
 
@@ -79,7 +79,7 @@ read_stat(const char *path)
         return -1;
 
     str[i] = '\0';              /* make sure the string is nul-terminated */
-    if (virStrToLong_ll(str, NULL, 10, (long long *) &r) < 0)
+    if (virStrToLong_ll(str, NULL, 10, &r) < 0)
         return -1;
 
     return r;