]> git.sesse.net Git - fjl/blobdiff - input_test.c
Fix signedness warnings.
[fjl] / input_test.c
index 3ff7ba097d657e4bab7100ea657b6702dc56d53d..57fae748621cfc5d2d4e0c87f1fe529773a91201 100644 (file)
@@ -42,7 +42,7 @@ void test_basic_reading()
        struct bit_source source;
        init_bit_source(&source, custom_read, &ud);
 
-       for (int i = 0; i < sizeof(bytes) * 8 / 6; ++i) {
+       for (unsigned i = 0; i < sizeof(bytes) * 8 / 6; ++i) {
                possibly_refill(&source, 6);
                unsigned ret = read_bits(&source, 6);
                assert(ret == 0x2a);
@@ -62,7 +62,7 @@ void test_slow_source()
        struct bit_source source;
        init_bit_source(&source, custom_read_slow, &ud);
 
-       for (int i = 0; i < sizeof(bytes) * 8 / 6; ++i) {
+       for (unsigned i = 0; i < sizeof(bytes) * 8 / 6; ++i) {
                possibly_refill(&source, 6);
                unsigned ret = read_bits(&source, 6);
                assert(ret == 0x2a);