# define CHECK_LIST_COUNT(list, cnt) \
do { \
- int actualCount; \
+ size_t actualCount; \
if ((actualCount = virPCIDeviceListCount(list)) != cnt) { \
virReportError(VIR_ERR_INTERNAL_ERROR, \
- "Unexpected count of items in " #list ": %d, " \
+ "Unexpected count of items in " #list ": %zu, " \
"expecting %zu", actualCount, (size_t) cnt); \
goto cleanup; \
} \
testVirHostdevPreparePCIHostdevs_unmanaged(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int active_count, inactive_count;
+ size_t active_count, inactive_count, i;
for (i = 0; i < nhostdevs; i++)
hostdevs[i]->managed = false;
testVirHostdevReAttachPCIHostdevs_unmanaged(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int active_count, inactive_count;
+ size_t active_count, inactive_count, i;
for (i = 0; i < nhostdevs; i++) {
if (hostdevs[i]->managed != false) {
testVirHostdevPreparePCIHostdevs_managed(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int active_count;
+ size_t active_count, i;
for (i = 0; i < nhostdevs; i++)
hostdevs[i]->managed = true;
testVirHostdevReAttachPCIHostdevs_managed(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int active_count;
+ size_t active_count, i;
for (i = 0; i < nhostdevs; i++) {
if (hostdevs[i]->managed != true) {
testVirHostdevDetachPCINodeDevice(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int inactive_count;
+ size_t inactive_count, i;
for (i = 0; i < nhostdevs; i++) {
inactive_count = virPCIDeviceListCount(mgr->inactivePCIHostdevs);
testVirHostdevReAttachPCINodeDevice(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- size_t i;
- int inactive_count;
+ size_t inactive_count, i;
for (i = 0; i < nhostdevs; i++) {
inactive_count = virPCIDeviceListCount(mgr->inactivePCIHostdevs);
testVirHostdevUpdateActivePCIHostdevs(const void *opaque ATTRIBUTE_UNUSED)
{
int ret = -1;
- int active_count;
+ size_t active_count;
active_count = virPCIDeviceListCount(mgr->activePCIHostdevs);