Using size_t counts will let us use VIR_APPEND_ELEMENT and friends. * src/conf/storage_conf.h (_virStoragePoolObjList) (_virStorageVolDefList): Track list sizes with size_t. * src/storage/storage_backend_rbd.c (virStorageBackendRBDRefreshPool): Fix type fallout. Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> --- src/conf/storage_conf.h | 4 ++-- src/storage/storage_backend_rbd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 251e897..d13cb99 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -112,7 +112,7 @@ struct _virStorageVolDef { typedef struct _virStorageVolDefList virStorageVolDefList; typedef virStorageVolDefList *virStorageVolDefListPtr; struct _virStorageVolDefList { - unsigned int count; + size_t count; virStorageVolDefPtr *objs; }; @@ -341,7 +341,7 @@ struct _virStoragePoolObj { typedef struct _virStoragePoolObjList virStoragePoolObjList; typedef virStoragePoolObjList *virStoragePoolObjListPtr; struct _virStoragePoolObjList { - unsigned int count; + size_t count; virStoragePoolObjPtr *objs; }; diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c index 4e18bf9..b7a41c2 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -381,7 +381,7 @@ static int virStorageBackendRBDRefreshPool(virConnectPtr conn, pool->volumes.objs[pool->volumes.count++] = vol; } - VIR_DEBUG("Found %d images in RBD pool %s", + VIR_DEBUG("Found %zu images in RBD pool %s", pool->volumes.count, pool->def->source.name); ret = 0; -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list