mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00: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:
parent
46e16b553d
commit
0a815baf2f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user