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:
Eric Blake 2011-05-11 19:41:46 -06:00
parent d218344e6c
commit 7647422a8c

View File

@ -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);
}