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:
Michal Privoznik 2021-08-23 12:54:32 +02:00
parent 9f28af4920
commit cb50dc0ecb

View File

@ -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;
}