mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
build: silence warning on 32-bit build
gcc warns when building libvirt 0.9.5 on a 32-bit machine: qemu/qemu_migration.c: In function 'qemuMigrationToFile': qemu/qemu_migration.c:2727:38: error: large integer implicitly truncated to unsigned type [-Woverflow] * src/qemu/qemu_domain.h (QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX): Cap to long when building for 32-bit platform.
This commit is contained in:
parent
a362f1f7aa
commit
ad4036c34a
@ -37,7 +37,13 @@
|
||||
(1 << VIR_DOMAIN_VIRT_XEN))
|
||||
|
||||
# define QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX (32 << 20)
|
||||
# define QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024))
|
||||
# if ULONG_MAX == 4294967295
|
||||
/* Qemu has a 64-bit limit, but we are limited by our historical choice of
|
||||
* representing bandwidth in a long instead of a 64-bit int. */
|
||||
# define QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX ULONG_MAX
|
||||
# else
|
||||
# define QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024))
|
||||
# endif
|
||||
|
||||
# define JOB_MASK(job) (1 << (job - 1))
|
||||
# define DEFAULT_JOB_MASK \
|
||||
|
Loading…
x
Reference in New Issue
Block a user