]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix char set read test
authorBastian Dehn <hhaalo@arcor.de>
Thu, 9 Oct 2025 18:00:28 +0000 (20:00 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 9 Oct 2025 18:00:28 +0000 (20:00 +0200)
tests/kds_s2000w_net_read_tests.c

index dd00bc316da49d166b787412d8673c8dcfef663d..871169a8d8703aa38eaef3b47b1f930d2b5c2c81 100644 (file)
@@ -17,7 +17,7 @@ void sane_kds_s2000w_net_read_test()
        h->image->data = malloc(sizeof(char) * 65536);
        char* imagedata = (char*) h->image->data;
        for (uint32_t i = 0; i < 65536; i++) {
-               imagedata[i] = 0xff;
+               imagedata[i] = (char) 0xff;
        }
 
        SANE_Int maxlen = 65536;
@@ -87,7 +87,7 @@ void sane_kds_s2000w_net_read_bytes_per_line_bigger_test()
        for (uint32_t i = 0; i < 3; i++) {
                image[i] = 0x0a;
        }
-       image[3] = 0xff;
+       image[3] = (char) 0xff;
 
        SANE_Int maxlen = 65536;
        char* dataptr = malloc(sizeof(char) * maxlen);