提交 7647422a 编写于 作者: E Eric Blake

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.
上级 d218344e
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册