]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: fix compilation warning in marshalling test
authorVincent Bernat <vincent@bernat.ch>
Sat, 27 Nov 2021 23:02:11 +0000 (00:02 +0100)
committerVincent Bernat <vincent@bernat.ch>
Sat, 27 Nov 2021 23:02:11 +0000 (00:02 +0100)
tests/check_marshal.c

index 4f9344625d89d10eb768c4c217c03fbe459254ba..195078f888596d4b0a4f10c2c1a472e998897bce 100644 (file)
@@ -412,7 +412,7 @@ START_TEST(test_too_small_unmarshal) {
        struct struct_nestedpointers *destination;
        void *buffer;
        size_t len, len2;
-       int i, j;
+       size_t i, j;
 
        log_register(donothing);
 
@@ -426,8 +426,8 @@ START_TEST(test_too_small_unmarshal) {
                for (i = 0; i < len; i++) {
                        len2 = struct_nestedpointers_unserialize(buffer, 1, &destination);
                        fail_unless(len2 == 0,
-                                   "Should not be able to deserialize, too small (%d<%d)",
-                                   i, len);
+                           "Should not be able to deserialize, too small (%zu<%zu)",
+                           i, len);
                }
        }
        len2 = struct_nestedpointers_unserialize(buffer, len + 5, &destination);