mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
build: silence clang false positive
Clang couldn't quite see that the same condition of (flags & VIR_DOMAIN_MEM_CONFIG) is used twice, such that the second block is guaranteed that def was assigned in the first block. * src/libxl/libxl_driver.c (libxlDomainSetMemoryFlags): Add a hint for clang.
This commit is contained in:
parent
d218344e6c
commit
7647422a8c
@ -1535,6 +1535,8 @@ libxlDomainSetMemoryFlags(virDomainPtr dom, unsigned long memory,
|
||||
ret = 0;
|
||||
|
||||
if (flags & VIR_DOMAIN_MEM_CONFIG) {
|
||||
/* clang 2.9 needs an extra hint. */
|
||||
sa_assert(def);
|
||||
def->mem.cur_balloon = memory;
|
||||
ret = virDomainSaveConfig(driver->configDir, def);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user