]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
testlibrbd: signed return types
authorSage Weil <sage.weil@dreamhost.com>
Sun, 6 Mar 2011 04:50:56 +0000 (20:50 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 6 Mar 2011 04:50:56 +0000 (20:50 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/testlibrbd.c
src/testlibrbdpp.cc

index a52772ad67aeb31ba2a7a6af2851579dac292eb0..e955662d05f39d262fc9f1156ba40c63eaaff07b 100644 (file)
@@ -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];
index e26cd6c8d18efae4148c1682f1fecd2036ae2f68..86aeee426f548740cfe17b2f8a4d24a275982d28 100644 (file)
@@ -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;