提交 7a8d7af6 编写于 作者: C Chen Hanxiao 提交者: Ján Tomko

virsh: initialize str to NULL to solve a build issue

Fix a -Werror=maybe-uninitialized issue.
Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 50f7960d
......@@ -218,7 +218,7 @@ VIR_ENUM_IMPL(vshDomainPMSuspendedReason,
static const char *
vshDomainStateReasonToString(int state, int reason)
{
const char *str;
const char *str = NULL;
switch ((virDomainState) state) {
case VIR_DOMAIN_NOSTATE:
str = vshDomainNostateReasonTypeToString(reason);
......
......@@ -10399,7 +10399,7 @@ VIR_ENUM_IMPL(vshDomainEventCrashed,
static const char *
vshDomainEventDetailToString(int event, int detail)
{
const char *str;
const char *str = NULL;
switch ((virDomainEventType) event) {
case VIR_DOMAIN_EVENT_DEFINED:
str = vshDomainEventDefinedTypeToString(detail);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册