mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
virscsi: Drop @tmp from virSCSIDeviceListDel
Clang on Rawhide started to complain that @tmp variable in virSCSIDeviceListDel() is set but not used. This is obviously a false positive because the variable is used to free device stolen from the list. Anyway, we can do without the variable so in this specific case let's fix our code to appease Clang. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
9f28af4920
commit
cb50dc0ecb
@ -414,8 +414,7 @@ virSCSIDeviceListDel(virSCSIDeviceList *list,
|
||||
virSCSIDeviceUsedByInfoFree(dev->used_by[i]);
|
||||
VIR_DELETE_ELEMENT(dev->used_by, i, dev->n_used_by);
|
||||
} else {
|
||||
g_autoptr(virSCSIDevice) tmp = NULL;
|
||||
tmp = virSCSIDeviceListSteal(list, dev);
|
||||
virSCSIDeviceFree(virSCSIDeviceListSteal(list, dev));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user