mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user