diff --git a/tests/api/test-get-buffer-data-default.c b/tests/api/test-get-buffer-data-default.c index 7efb37ac..bb08dff6 100644 --- a/tests/api/test-get-buffer-data-default.c +++ b/tests/api/test-get-buffer-data-default.c @@ -141,7 +141,7 @@ static duk_ret_t test_slice(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); for (i = 0; i < sz; i++) { printf("p[%ld] = 0x%02x\n", (long) i, (unsigned int) p[i]); } @@ -183,7 +183,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); } @@ -193,7 +193,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); } @@ -203,7 +203,7 @@ static duk_ret_t test_uncovered_buffer(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); } @@ -228,7 +228,7 @@ static duk_ret_t test_invalid_index(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_data_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); } diff --git a/tests/api/test-get-buffer-default.c b/tests/api/test-get-buffer-default.c index 2df2c9e5..608caf74 100644 --- a/tests/api/test-get-buffer-default.c +++ b/tests/api/test-get-buffer-default.c @@ -114,7 +114,7 @@ static duk_ret_t test_invalid_index(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); } @@ -142,7 +142,7 @@ static duk_ret_t test_buffer_object(duk_context *ctx, void *udata) { sz = (duk_size_t) 0xdeadbeefUL; p = duk_get_buffer_default(ctx, -1, &sz, (void *) 0x12345678UL, (duk_size_t) 0x87654321UL); if (p) { - printf("p is not NULL, sz=%ld\n", (long) sz); + printf("p is not NULL, sz=%lu\n", (unsigned long) sz); } else { printf("p is NULL\n"); }