From d4e4af1bed29217b52a39cf0fb861acb06b05771 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 5 Mar 2011 20:50:56 -0800 Subject: [PATCH] testlibrbd: signed return types Signed-off-by: Sage Weil --- src/testlibrbd.c | 8 ++++---- src/testlibrbdpp.cc | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/testlibrbd.c b/src/testlibrbd.c index a52772ad67aeb..e955662d05f39 100644 --- a/src/testlibrbd.c +++ b/src/testlibrbd.c @@ -67,7 +67,7 @@ void test_ls(rados_ioctx_t io_ctx, size_t num_expected, ...) printf("names is %p\n", names); printf("num images is: %d\nexpected: %d\n", num_images, (int)num_expected); assert(num_images >= 0); - assert(num_images == num_expected); + assert(num_images == (int)num_expected); for (i = 0, cur_name = names; i < num_images; i++) { printf("image: %s\n", cur_name); @@ -136,7 +136,7 @@ void test_ls_snaps(rbd_image_t image, int num_expected, ...) continue; if (strcmp(snaps[j].name, expected) == 0) { printf("found %s with size %llu\n", snaps[j].name, (unsigned long long) snaps[j].size); - assert(snaps[j].size == expected_size); + assert((int)snaps[j].size == expected_size); free((void *) snaps[j].name); snaps[j].name = NULL; found = 1; @@ -184,7 +184,7 @@ void aio_write_test_data(rbd_image_t image, const char *test_data, off_t off) void write_test_data(rbd_image_t image, const char *test_data, off_t off) { - size_t written; + int written; size_t len = strlen(test_data); while (len > 0) { written = rbd_write(image, off, len, test_data); @@ -214,7 +214,7 @@ void aio_read_test_data(rbd_image_t image, const char *expected, off_t off) void read_test_data(rbd_image_t image, const char *expected, off_t off) { - size_t read, total_read = 0; + int read, total_read = 0; size_t expected_len = strlen(expected); size_t len = expected_len; char result[TEST_IO_SIZE]; diff --git a/src/testlibrbdpp.cc b/src/testlibrbdpp.cc index e26cd6c8d18ef..86aeee426f548 100644 --- a/src/testlibrbdpp.cc +++ b/src/testlibrbdpp.cc @@ -175,7 +175,7 @@ void aio_write_test_data(librbd::Image& image, const char *test_data, off_t off) void write_test_data(librbd::Image& image, const char *test_data, off_t off) { - size_t written; + int written; size_t len = strlen(test_data); ceph::bufferlist bl; bl.append(test_data, len); @@ -203,7 +203,7 @@ void aio_read_test_data(librbd::Image& image, const char *expected, off_t off) void read_test_data(librbd::Image& image, const char *expected, off_t off) { - size_t read, total_read = 0; + int read, total_read = 0; size_t expected_len = strlen(expected); size_t len = expected_len; ceph::bufferlist bl; -- 2.39.5