mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
xen: fix build error on rhel-5
../../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>
This commit is contained in:
parent
f38bd06bff
commit
e60c84f0ce
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user