提交 0a815baf 编写于 作者: D Daniel P. Berrangé

util: ensure min/maj are initialized in virGetDeviceID

The stub impl of virGetDeviceID just returns ENOSYS and does not
initialize the min/maj output parameters. This lead to a false
positive warning on mingw about possible use of uninitialized
variables.
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 46e16b55
......@@ -1407,9 +1407,10 @@ virGetDeviceID(const char *path, int *maj, int *min)
#else
int
virGetDeviceID(const char *path G_GNUC_UNUSED,
int *maj G_GNUC_UNUSED,
int *min G_GNUC_UNUSED)
int *maj,
int *min)
{
*maj = *min = 0;
return -ENOSYS;
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册