Re: [libvirt] [PATCH] rbd: use unsigned long long instead of uint64_t

2016-03-29 Thread Peter Krempa
On Mon, Mar 28, 2016 at 15:19:36 +0800, Shanzhi Yu wrote:
> Fix below error:
> storage/storage_backend_rbd.c: In function 
> 'virStorageBackendRBDSetAllocation':
> storage/storage_backend_rbd.c:337:5: error: format '%llu' expects argument of 
> type 'long long unsigned int', but argument 8 has type 'uint64_t' 
> [-Werror=format=]
> VIR_DEBUG("Found %llu bytes allocated for RBD image %s",
> 
> Signed-off-by: Shanzhi Yu 
> ---
>  src/storage/storage_backend_rbd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

NACK, the correct approach is to use "size_t" as
virStorageBackendRBDRefreshVolInfoCb is getting that as the size info.
The callback has to be fixed too. I've pushed the correct version.

Peter


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] rbd: use unsigned long long instead of uint64_t

2016-03-28 Thread Shanzhi Yu
Fix below error:
storage/storage_backend_rbd.c: In function 'virStorageBackendRBDSetAllocation':
storage/storage_backend_rbd.c:337:5: error: format '%llu' expects argument of 
type 'long long unsigned int', but argument 8 has type 'uint64_t' 
[-Werror=format=]
VIR_DEBUG("Found %llu bytes allocated for RBD image %s",

Signed-off-by: Shanzhi Yu 
---
 src/storage/storage_backend_rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_rbd.c 
b/src/storage/storage_backend_rbd.c
index c9b47e2..dec0905 100644
--- a/src/storage/storage_backend_rbd.c
+++ b/src/storage/storage_backend_rbd.c
@@ -324,7 +324,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol,
   rbd_image_info_t *info)
 {
 int r, ret = -1;
-uint64_t allocation = 0;
+unsigned long long allocation = 0;
 
 if ((r = rbd_diff_iterate2(image, NULL, 0, info->size, 0, 1,
,
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list