Commit 6784d84c9dec5177b26f71ea6cd7ebb396a195af

Pierre Wendling 2022-10-10T01:31:14

N3DS: Fix `-Wformat` warnings in tests. All warnings were about invalid specifiers. Since U/Sint32 is a long, using `%d` emits a -Wformat warning.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
diff --git a/test/checkkeysthreads.c b/test/checkkeysthreads.c
index 62d5226..0716d0f 100644
--- a/test/checkkeysthreads.c
+++ b/test/checkkeysthreads.c
@@ -162,7 +162,8 @@ loop()
     fprintf(stderr, "starting loop\n"); fflush(stderr);
     // while (SDL_PollEvent(&event)) {
     while (!done && SDL_WaitEvent(&event)) {
-        fprintf(stderr, "got event type: %d\n", event.type); fflush(stderr);
+        fprintf(stderr, "got event type: %" SDL_PRIu32 "\n", event.type);
+        fflush(stderr);
         switch (event.type) {
         case SDL_KEYDOWN:
         case SDL_KEYUP:
diff --git a/test/controllermap.c b/test/controllermap.c
index 43bf793..5905b8a 100644
--- a/test/controllermap.c
+++ b/test/controllermap.c
@@ -373,8 +373,8 @@ WatchJoystick(SDL_Joystick * joystick)
 
     /* Print info about the joystick we are watching */
     name = SDL_JoystickName(joystick);
-    SDL_Log("Watching joystick %d: (%s)\n", SDL_JoystickInstanceID(joystick),
-           name ? name : "Unknown Joystick");
+    SDL_Log("Watching joystick %" SDL_PRIs32 ": (%s)\n", SDL_JoystickInstanceID(joystick),
+            name ? name : "Unknown Joystick");
     SDL_Log("Joystick has %d axes, %d hats, %d balls, and %d buttons\n",
            SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick),
            SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick));
@@ -781,7 +781,7 @@ main(int argc, char *argv[])
             SDL_Log("      balls: %d\n", SDL_JoystickNumBalls(joystick));
             SDL_Log("       hats: %d\n", SDL_JoystickNumHats(joystick));
             SDL_Log("    buttons: %d\n", SDL_JoystickNumButtons(joystick));
-            SDL_Log("instance id: %d\n", SDL_JoystickInstanceID(joystick));
+            SDL_Log("instance id: %" SDL_PRIu32 "\n", SDL_JoystickInstanceID(joystick));
             SDL_Log("       guid: %s\n", guid);
             SDL_Log("    VID/PID: 0x%.4x/0x%.4x\n", SDL_JoystickGetVendor(joystick), SDL_JoystickGetProduct(joystick));
             SDL_JoystickClose(joystick);
diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c
index dd7ef3f..e6127b5 100644
--- a/test/testautomation_audio.c
+++ b/test/testautomation_audio.c
@@ -725,7 +725,7 @@ int audio_openCloseAndGetAudioStatus()
        /* Open device */
        id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
        SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device);
-       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %i", id);
+       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id);
        if (id > 1) {
 
          /* Check device audio status */
@@ -783,11 +783,11 @@ int audio_lockUnlockOpenAudioDevice()
        /* Open device */
        id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
        SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device);
-       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %i", id);
+       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >=2, got: %" SDL_PRIu32, id);
        if (id > 1) {
          /* Lock to protect callback */
          SDL_LockAudioDevice(id);
-         SDLTest_AssertPass("SDL_LockAudioDevice(%i)", id);
+         SDLTest_AssertPass("SDL_LockAudioDevice(%" SDL_PRIu32 ")", id);
 
          /* Simulate callback processing */
          SDL_Delay(10);
@@ -795,7 +795,7 @@ int audio_lockUnlockOpenAudioDevice()
 
          /* Unlock again */
          SDL_UnlockAudioDevice(id);
-         SDLTest_AssertPass("SDL_UnlockAudioDevice(%i)", id);
+         SDLTest_AssertPass("SDL_UnlockAudioDevice(%" SDL_PRIu32 ")", id);
 
          /* Close device again */
          SDL_CloseAudioDevice(id);
@@ -945,7 +945,7 @@ int audio_openCloseAudioDeviceConnected()
        /* Open device */
        id = SDL_OpenAudioDevice(device, 0, &desired, &obtained, SDL_AUDIO_ALLOW_ANY_CHANGE);
        SDLTest_AssertPass("SDL_OpenAudioDevice('%s',...)", device);
-       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >1, got: %i", id);
+       SDLTest_AssertCheck(id > 1, "Validate device ID; expected: >1, got: %" SDL_PRIu32, id);
        if (id > 1) {
 
 /* TODO: enable test code when function is available in SDL2 */
diff --git a/test/testautomation_guid.c b/test/testautomation_guid.c
index 0bfedeb..bab2b9f 100644
--- a/test/testautomation_guid.c
+++ b/test/testautomation_guid.c
@@ -108,7 +108,7 @@ TestGuidToString(void *arg)
             /* Check bytes before guid_str_buf */
             expected_prefix = fill_char | (fill_char << 8) | (fill_char << 16) | (fill_char << 24);
             SDL_memcpy(&actual_prefix, guid_str_buf, 4);
-            SDLTest_AssertCheck(expected_prefix == actual_prefix, "String buffer memory before output untouched, expected: %i, got: %i, at size=%d", expected_prefix, actual_prefix, size);
+            SDLTest_AssertCheck(expected_prefix == actual_prefix, "String buffer memory before output untouched, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32 ", at size=%d", expected_prefix, actual_prefix, size);
 
             /* Check that we did not overwrite too much */
             written_size = 0;
diff --git a/test/testautomation_keyboard.c b/test/testautomation_keyboard.c
index 84a7635..a83f536 100644
--- a/test/testautomation_keyboard.c
+++ b/test/testautomation_keyboard.c
@@ -67,37 +67,37 @@ keyboard_getKeyFromName(void *arg)
    /* Case where Key is known, 1 character input */
    result = SDL_GetKeyFromName("A");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/single)");
-   SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %i", SDLK_a, result);
+   SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result);
 
    /* Case where Key is known, 2 character input */
    result = SDL_GetKeyFromName("F1");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/double)");
-   SDLTest_AssertCheck(result == SDLK_F1, "Verify result from call, expected: %i, got: %i", SDLK_F1, result);
+   SDLTest_AssertCheck(result == SDLK_F1, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_F1, result);
 
    /* Case where Key is known, 3 character input */
    result = SDL_GetKeyFromName("End");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/triple)");
-   SDLTest_AssertCheck(result == SDLK_END, "Verify result from call, expected: %i, got: %i", SDLK_END, result);
+   SDLTest_AssertCheck(result == SDLK_END, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_END, result);
 
    /* Case where Key is known, 4 character input */
    result = SDL_GetKeyFromName("Find");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/quad)");
-   SDLTest_AssertCheck(result == SDLK_FIND, "Verify result from call, expected: %i, got: %i", SDLK_FIND, result);
+   SDLTest_AssertCheck(result == SDLK_FIND, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_FIND, result);
 
    /* Case where Key is known, multiple character input */
    result = SDL_GetKeyFromName("AudioStop");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(known/multi)");
-   SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, "Verify result from call, expected: %i, got: %i", SDLK_AUDIOSTOP, result);
+   SDLTest_AssertCheck(result == SDLK_AUDIOSTOP, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_AUDIOSTOP, result);
 
    /* Case where Key is unknown */
    result = SDL_GetKeyFromName("NotThere");
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(unknown)");
-   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %i", SDLK_UNKNOWN, result);
+   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result);
 
    /* Case where input is NULL/invalid */
    result = SDL_GetKeyFromName(NULL);
    SDLTest_AssertPass("Call to SDL_GetKeyFromName(NULL)");
-   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %i", SDLK_UNKNOWN, result);
+   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result);
 
    return TEST_COMPLETED;
 }
@@ -134,12 +134,12 @@ keyboard_getKeyFromScancode(void *arg)
    /* Case where input is valid */
    result = SDL_GetKeyFromScancode(SDL_SCANCODE_A);
    SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(valid)");
-   SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %i", SDLK_a, result);
+   SDLTest_AssertCheck(result == SDLK_a, "Verify result from call, expected: %i, got: %" SDL_PRIs32, SDLK_a, result);
 
    /* Case where input is zero */
    result = SDL_GetKeyFromScancode(0);
    SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(0)");
-   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %i", SDLK_UNKNOWN, result);
+   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result);
 
    /* Clear error message */
    SDL_ClearError();
@@ -148,13 +148,13 @@ keyboard_getKeyFromScancode(void *arg)
    /* Case where input is invalid (too small) */
    result = SDL_GetKeyFromScancode(-999);
    SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(-999)");
-   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %i", SDLK_UNKNOWN, result);
+   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result);
    _checkInvalidScancodeError();
 
    /* Case where input is invalid (too big) */
    result = SDL_GetKeyFromScancode(999);
    SDLTest_AssertPass("Call to SDL_GetKeyFromScancode(999)");
-   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %i", SDLK_UNKNOWN, result);
+   SDLTest_AssertCheck(result == SDLK_UNKNOWN, "Verify result from call is UNKNOWN, expected: %i, got: %" SDL_PRIs32, SDLK_UNKNOWN, result);
    _checkInvalidScancodeError();
 
    return TEST_COMPLETED;
@@ -258,7 +258,7 @@ keyboard_getKeyNameNegative(void *arg)
    /* Unknown keycode */
    keycode = SDLK_UNKNOWN;
    result = (char *)SDL_GetKeyName(keycode);
-   SDLTest_AssertPass("Call to SDL_GetKeyName(%d/unknown)", keycode);
+   SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/unknown)", keycode);
    SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL");
    SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result);
 
@@ -269,7 +269,7 @@ keyboard_getKeyNameNegative(void *arg)
    /* Negative keycode */
    keycode = (SDL_Keycode)SDLTest_RandomIntegerInRange(-255, -1);
    result = (char *)SDL_GetKeyName(keycode);
-   SDLTest_AssertPass("Call to SDL_GetKeyName(%d/negative)", keycode);
+   SDLTest_AssertPass("Call to SDL_GetKeyName(%" SDL_PRIs32 "/negative)", keycode);
    SDLTest_AssertCheck(result != NULL, "Verify result from call is not NULL");
    SDLTest_AssertCheck(SDL_strcmp(result, expected) == 0, "Verify result from call is valid, expected: '%s', got: '%s'", expected, result);
    _checkInvalidScancodeError();
diff --git a/test/testautomation_math.c b/test/testautomation_math.c
index eee05da..bdf5703 100644
--- a/test/testautomation_math.c
+++ b/test/testautomation_math.c
@@ -183,7 +183,7 @@ helper_range(const char *func_name, d_to_d_func func)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("%s: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("%s: Testing a range of %u values with steps of %" SDL_PRIu32,
                        func_name,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
@@ -770,7 +770,7 @@ copysign_rangeTest(void *args)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("Copysign: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("Copysign: Testing a range of %u values with steps of %" SDL_PRIu32,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
 
@@ -973,7 +973,7 @@ fmod_rangeTest(void *args)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("Fmod: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("Fmod: Testing a range of %u values with steps of %" SDL_PRIu32,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
 
@@ -1684,7 +1684,7 @@ pow_rangeTest(void *args)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("Pow: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("Pow: Testing a range of %u values with steps of %" SDL_PRIu32,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
 
@@ -2011,7 +2011,7 @@ cos_rangeTest(void *args)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("Cos: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("Cos: Testing a range of %u values with steps of %" SDL_PRIu32,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
 
@@ -2129,7 +2129,7 @@ sin_rangeTest(void *args)
     Uint32 i;
     double test_value = 0.0;
 
-    SDLTest_AssertPass("Sin: Testing a range of %u values with steps of %u",
+    SDLTest_AssertPass("Sin: Testing a range of %u values with steps of %" SDL_PRIu32,
                        RANGE_TEST_ITERATIONS,
                        RANGE_TEST_STEP);
 
diff --git a/test/testautomation_mouse.c b/test/testautomation_mouse.c
index b9e74cb..f833480 100644
--- a/test/testautomation_mouse.c
+++ b/test/testautomation_mouse.c
@@ -41,21 +41,21 @@ mouse_getMouseState(void *arg)
    /* Case where x, y pointer is NULL */
    state = SDL_GetMouseState(NULL, NULL);
    SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, NULL)");
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where x pointer is not NULL */
    x = INT_MIN;
    state = SDL_GetMouseState(&x, NULL);
    SDLTest_AssertPass("Call to SDL_GetMouseState(&x, NULL)");
    SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where y pointer is not NULL */
    y = INT_MIN;
    state = SDL_GetMouseState(NULL, &y);
    SDLTest_AssertPass("Call to SDL_GetMouseState(NULL, &y)");
    SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where x and y pointer is not NULL */
    x = INT_MIN;
@@ -64,7 +64,7 @@ mouse_getMouseState(void *arg)
    SDLTest_AssertPass("Call to SDL_GetMouseState(&x, &y)");
    SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x);
    SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    return TEST_COMPLETED;
 }
@@ -87,21 +87,21 @@ mouse_getRelativeMouseState(void *arg)
    /* Case where x, y pointer is NULL */
    state = SDL_GetRelativeMouseState(NULL, NULL);
    SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, NULL)");
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where x pointer is not NULL */
    x = INT_MIN;
    state = SDL_GetRelativeMouseState(&x, NULL);
    SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, NULL)");
    SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where y pointer is not NULL */
    y = INT_MIN;
    state = SDL_GetRelativeMouseState(NULL, &y);
    SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(NULL, &y)");
    SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    /* Case where x and y pointer is not NULL */
    x = INT_MIN;
@@ -110,7 +110,7 @@ mouse_getRelativeMouseState(void *arg)
    SDLTest_AssertPass("Call to SDL_GetRelativeMouseState(&x, &y)");
    SDLTest_AssertCheck(x > INT_MIN, "Validate that value of x is > INT_MIN, got: %i", x);
    SDLTest_AssertCheck(y > INT_MIN, "Validate that value of y is > INT_MIN, got: %i", y);
-   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %u", state);
+   SDLTest_AssertCheck(_mouseStateCheck(state), "Validate state returned from function, got: %" SDL_PRIu32, state);
 
    return TEST_COMPLETED;
 }
diff --git a/test/testautomation_pixels.c b/test/testautomation_pixels.c
index 0f6870c..63b177f 100644
--- a/test/testautomation_pixels.c
+++ b/test/testautomation_pixels.c
@@ -137,18 +137,18 @@ pixels_allocFreeFormat(void *arg)
 
   /* Blank/unknown format */
   format = 0;
-  SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
+  SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", unknownFormat, format);
 
   /* Allocate format */
   result = SDL_AllocFormat(format);
   SDLTest_AssertPass("Call to SDL_AllocFormat()");
   SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
   if (result != NULL) {
-    SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
+    SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format);
     SDLTest_AssertCheck(result->BitsPerPixel == 0, "Verify value of result.BitsPerPixel; expected: 0, got %u", result->BitsPerPixel);
     SDLTest_AssertCheck(result->BytesPerPixel == 0, "Verify value of result.BytesPerPixel; expected: 0, got %u", result->BytesPerPixel);
     masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
-    SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %u", masks);
+    SDLTest_AssertCheck(masks == 0, "Verify value of result.[RGBA]mask combined; expected: 0, got %" SDL_PRIu32, masks);
 
     /* Deallocate again */
     SDL_FreeFormat(result);
@@ -158,19 +158,19 @@ pixels_allocFreeFormat(void *arg)
   /* RGB formats */
   for (i = 0; i < _numRGBPixelFormats; i++) {
     format = _RGBPixelFormats[i];
-    SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
+    SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format);
 
     /* Allocate format */
     result = SDL_AllocFormat(format);
     SDLTest_AssertPass("Call to SDL_AllocFormat()");
     SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
     if (result != NULL) {
-      SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %u, got %u", format, result->format);
+      SDLTest_AssertCheck(result->format == format, "Verify value of result.format; expected: %" SDL_PRIu32 ", got %" SDL_PRIu32, format, result->format);
       SDLTest_AssertCheck(result->BitsPerPixel > 0, "Verify value of result.BitsPerPixel; expected: >0, got %u", result->BitsPerPixel);
       SDLTest_AssertCheck(result->BytesPerPixel > 0, "Verify value of result.BytesPerPixel; expected: >0, got %u", result->BytesPerPixel);
       if (result->palette != NULL) {
          masks = result->Rmask | result->Gmask | result->Bmask | result->Amask;
-         SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %u", masks);
+         SDLTest_AssertCheck(masks > 0, "Verify value of result.[RGBA]mask combined; expected: >0, got %" SDL_PRIu32, masks);
       }
 
       /* Deallocate again */
@@ -182,7 +182,7 @@ pixels_allocFreeFormat(void *arg)
   /* Non-RGB formats */
   for (i = 0; i < _numNonRGBPixelFormats; i++) {
     format = _nonRGBPixelFormats[i];
-    SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
+    SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format);
 
     /* Try to allocate format */
     result = SDL_AllocFormat(format);
@@ -198,7 +198,7 @@ pixels_allocFreeFormat(void *arg)
     SDLTest_AssertPass("Call to SDL_ClearError()");
     format = _invalidPixelFormats[i];
     result = SDL_AllocFormat(format);
-    SDLTest_AssertPass("Call to SDL_AllocFormat(%u)", format);
+    SDLTest_AssertPass("Call to SDL_AllocFormat(%" SDL_PRIu32 ")", format);
     SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
     error = SDL_GetError();
     SDLTest_AssertPass("Call to SDL_GetError()");
@@ -241,7 +241,7 @@ pixels_getPixelFormatName(void *arg)
 
   /* Blank/undefined format */
   format = 0;
-  SDLTest_Log("RGB Format: %s (%u)", unknownFormat, format);
+  SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", unknownFormat, format);
 
   /* Get name of format */
   result = SDL_GetPixelFormatName(format);
@@ -256,7 +256,7 @@ pixels_getPixelFormatName(void *arg)
   /* RGB formats */
   for (i = 0; i < _numRGBPixelFormats; i++) {
     format = _RGBPixelFormats[i];
-    SDLTest_Log("RGB Format: %s (%u)", _RGBPixelFormatsVerbose[i], format);
+    SDLTest_Log("RGB Format: %s (%" SDL_PRIu32 ")", _RGBPixelFormatsVerbose[i], format);
 
     /* Get name of format */
     result = SDL_GetPixelFormatName(format);
@@ -272,7 +272,7 @@ pixels_getPixelFormatName(void *arg)
   /* Non-RGB formats */
   for (i = 0; i < _numNonRGBPixelFormats; i++) {
     format = _nonRGBPixelFormats[i];
-    SDLTest_Log("non-RGB Format: %s (%u)", _nonRGBPixelFormatsVerbose[i], format);
+    SDLTest_Log("non-RGB Format: %s (%" SDL_PRIu32 ")", _nonRGBPixelFormatsVerbose[i], format);
 
     /* Get name of format */
     result = SDL_GetPixelFormatName(format);
@@ -293,7 +293,7 @@ pixels_getPixelFormatName(void *arg)
   for (i = 0; i < _numInvalidPixelFormats; i++) {
     format = _invalidPixelFormats[i];
     result = SDL_GetPixelFormatName(format);
-    SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format);
+    SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%" SDL_PRIu32 ")", format);
     SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
     if (result != NULL) {
       SDLTest_AssertCheck(result[0] != '\0',
diff --git a/test/testautomation_platform.c b/test/testautomation_platform.c
index 0b37dd9..e866148 100644
--- a/test/testautomation_platform.c
+++ b/test/testautomation_platform.c
@@ -106,7 +106,7 @@ int platform_testEndianessAndSwap(void *arg)
 
     /* Test 32 swap. */
     SDLTest_AssertCheck( SDL_Swap32(value32) == swapped32,
-             "SDL_Swap32(): 32 bit swapped: 0x%X => 0x%X",
+             "SDL_Swap32(): 32 bit swapped: 0x%" SDL_PRIX32 " => 0x%" SDL_PRIX32,
              value32, SDL_Swap32(value32) );
 
     /* Test 64 swap. */
diff --git a/test/testautomation_rwops.c b/test/testautomation_rwops.c
index f2d5627..16d5407 100644
--- a/test/testautomation_rwops.c
+++ b/test/testautomation_rwops.c
@@ -239,7 +239,7 @@ rwops_testMem (void)
    if (rw == NULL) return TEST_ABORTED;
 
    /* Check type */
-   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY, "Verify RWops type is SDL_RWOPS_MEMORY; expected: %d, got: %d", SDL_RWOPS_MEMORY, rw->type);
+   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY, "Verify RWops type is SDL_RWOPS_MEMORY; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY, rw->type);
 
    /* Run generic tests */
    _testGenericRWopsValidations(rw, 1);
@@ -275,7 +275,7 @@ rwops_testConstMem (void)
    if (rw == NULL) return TEST_ABORTED;
 
    /* Check type */
-   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY_RO, "Verify RWops type is SDL_RWOPS_MEMORY_RO; expected: %d, got: %d", SDL_RWOPS_MEMORY_RO, rw->type);
+   SDLTest_AssertCheck(rw->type == SDL_RWOPS_MEMORY_RO, "Verify RWops type is SDL_RWOPS_MEMORY_RO; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_MEMORY_RO, rw->type);
 
    /* Run generic tests */
    _testGenericRWopsValidations( rw, 0 );
@@ -321,8 +321,8 @@ rwops_testFileRead(void)
       "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type);
 #else
    SDLTest_AssertCheck(
-      rw->type == SDL_RWOPS_STDFILE,
-      "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type);
+       rw->type == SDL_RWOPS_STDFILE,
+       "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type);
 #endif
 
    /* Run generic tests */
@@ -368,8 +368,8 @@ rwops_testFileWrite(void)
       "Verify RWops type is SDL_RWOPS_WINFILE; expected: %d, got: %d", SDL_RWOPS_WINFILE, rw->type);
 #else
    SDLTest_AssertCheck(
-      rw->type == SDL_RWOPS_STDFILE,
-      "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type);
+       rw->type == SDL_RWOPS_STDFILE,
+       "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type);
 #endif
 
    /* Run generic tests */
@@ -420,8 +420,8 @@ rwops_testFPRead(void)
 
    /* Check type */
    SDLTest_AssertCheck(
-      rw->type == SDL_RWOPS_STDFILE,
-      "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type);
+       rw->type == SDL_RWOPS_STDFILE,
+       "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type);
 
    /* Run generic tests */
    _testGenericRWopsValidations( rw, 0 );
@@ -473,8 +473,8 @@ rwops_testFPWrite(void)
 
    /* Check type */
    SDLTest_AssertCheck(
-      rw->type == SDL_RWOPS_STDFILE,
-      "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %d", SDL_RWOPS_STDFILE, rw->type);
+       rw->type == SDL_RWOPS_STDFILE,
+       "Verify RWops type is SDL_RWOPS_STDFILE; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_STDFILE, rw->type);
 
    /* Run generic tests */
    _testGenericRWopsValidations( rw, 1 );
@@ -506,8 +506,8 @@ rwops_testAllocFree (void)
 
    /* Check type */
    SDLTest_AssertCheck(
-      rw->type == SDL_RWOPS_UNKNOWN,
-      "Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %d", SDL_RWOPS_UNKNOWN, rw->type);
+       rw->type == SDL_RWOPS_UNKNOWN,
+       "Verify RWops type is SDL_RWOPS_UNKNOWN; expected: %d, got: %" SDL_PRIu32, SDL_RWOPS_UNKNOWN, rw->type);
 
    /* Free context again */
    SDL_FreeRW(rw);
@@ -684,7 +684,7 @@ rwops_testFileWriteReadEndian(void)
      SDLTest_AssertCheck(BE16test == BE16value, "Validate return value from SDL_ReadBE16, expected: %hu, got: %hu", BE16value, BE16test);
      BE32test = SDL_ReadBE32(rw);
      SDLTest_AssertPass("Call to SDL_ReadBE32()");
-     SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %u, got: %u", BE32value, BE32test);
+     SDLTest_AssertCheck(BE32test == BE32value, "Validate return value from SDL_ReadBE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, BE32value, BE32test);
      BE64test = SDL_ReadBE64(rw);
      SDLTest_AssertPass("Call to SDL_ReadBE64()");
      SDLTest_AssertCheck(BE64test == BE64value, "Validate return value from SDL_ReadBE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, BE64value, BE64test);
@@ -693,7 +693,7 @@ rwops_testFileWriteReadEndian(void)
      SDLTest_AssertCheck(LE16test == LE16value, "Validate return value from SDL_ReadLE16, expected: %hu, got: %hu", LE16value, LE16test);
      LE32test = SDL_ReadLE32(rw);
      SDLTest_AssertPass("Call to SDL_ReadLE32()");
-     SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %u, got: %u", LE32value, LE32test);
+     SDLTest_AssertCheck(LE32test == LE32value, "Validate return value from SDL_ReadLE32, expected: %" SDL_PRIu32 ", got: %" SDL_PRIu32, LE32value, LE32test);
      LE64test = SDL_ReadLE64(rw);
      SDLTest_AssertPass("Call to SDL_ReadLE64()");
      SDLTest_AssertCheck(LE64test == LE64value, "Validate return value from SDL_ReadLE64, expected: %"SDL_PRIu64", got: %"SDL_PRIu64, LE64value, LE64test);
diff --git a/test/testautomation_sdltest.c b/test/testautomation_sdltest.c
index 809664d..9c97e60 100644
--- a/test/testautomation_sdltest.c
+++ b/test/testautomation_sdltest.c
@@ -891,8 +891,8 @@ sdltest_randomBoundaryNumberSint32(void *arg)
   sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min + 1, long_max, SDL_FALSE);
   SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
   SDLTest_AssertCheck(
-    sresult == long_min,
-    "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_min, sresult);
+      sresult == long_min,
+      "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult);
   lastError = (char *)SDL_GetError();
   SDLTest_AssertPass("SDL_GetError()");
   SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
@@ -901,8 +901,8 @@ sdltest_randomBoundaryNumberSint32(void *arg)
   sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE);
   SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
   SDLTest_AssertCheck(
-    sresult == long_max,
-    "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_max, sresult);
+      sresult == long_max,
+      "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_max, sresult);
   lastError = (char *)SDL_GetError();
   SDLTest_AssertPass("SDL_GetError()");
   SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
@@ -911,8 +911,8 @@ sdltest_randomBoundaryNumberSint32(void *arg)
   sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE);
   SDLTest_AssertPass("Call to SDLTest_RandomSint32BoundaryValue");
   SDLTest_AssertCheck(
-    sresult == long_min,
-    "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %d, got: %"SDL_PRIs64, long_min, sresult);
+      sresult == long_min,
+      "Validate result value for parameters(LONG_MIN,LONG_MAX,SDL_FALSE); expected: %" SDL_PRIs32 ", got: %" SDL_PRIs64, long_min, sresult);
   lastError = (char *)SDL_GetError();
   SDLTest_AssertPass("SDL_GetError()");
   SDLTest_AssertCheck(lastError != NULL && SDL_strcmp(lastError, expectedError) == 0,
@@ -1058,56 +1058,56 @@ sdltest_randomIntegerInRange(void *arg)
   max = min + (Sint32)SDLTest_RandomUint8() + 2;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,max)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   /* One Range */
   min = (Sint32)SDLTest_RandomSint16();
   max = min + 1;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min+1)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   /* Zero range */
   min = (Sint32)SDLTest_RandomSint16();
   max = min;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(min,min)");
-  SDLTest_AssertCheck(min == result, "Validated returned value; expected: %d, got: %d", min, result);
+  SDLTest_AssertCheck(min == result, "Validated returned value; expected: %" SDL_PRIs32 ", got: %" SDL_PRIs32, min, result);
 
   /* Zero range at zero */
   min = 0;
   max = 0;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(0,0)");
-  SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %d", result);
+  SDLTest_AssertCheck(result == 0, "Validated returned value; expected: 0, got: %" SDL_PRIs32, result);
 
   /* Swapped min-max */
   min = (Sint32)SDLTest_RandomSint16();
   max = min + (Sint32)SDLTest_RandomUint8() + 2;
   result = SDLTest_RandomIntegerInRange(max, min);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(max,min)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   /* Range with min at integer limit */
   min = long_min;
   max = long_max + (Sint32)SDLTest_RandomSint16();
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,...)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   /* Range with max at integer limit */
   min = long_min - (Sint32)SDLTest_RandomSint16();
   max = long_max;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(...,SINT32_MAX)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   /* Full integer range */
   min = long_min;
   max = long_max;
   result = SDLTest_RandomIntegerInRange(min, max);
   SDLTest_AssertPass("Call to SDLTest_RandomIntegerInRange(SINT32_MIN,SINT32_MAX)");
-  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%d,%d], got: %d", min, max, result);
+  SDLTest_AssertCheck(min <= result && result <= max, "Validated returned value; expected: [%" SDL_PRIs32 ",%" SDL_PRIs32 "], got: %" SDL_PRIs32, min, max, result);
 
   return TEST_COMPLETED;
 }
diff --git a/test/testautomation_timer.c b/test/testautomation_timer.c
index a42eb37..3cb160a 100644
--- a/test/testautomation_timer.c
+++ b/test/testautomation_timer.c
@@ -88,17 +88,17 @@ timer_delayAndGetTicks(void *arg)
   /* Get ticks count - should be non-zero by now */
   result = SDL_GetTicks();
   SDLTest_AssertPass("Call to SDL_GetTicks()");
-  SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %d", result);
+  SDLTest_AssertCheck(result > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result);
 
   /* Delay a bit longer and measure ticks and verify difference */
   SDL_Delay(testDelay);
-  SDLTest_AssertPass("Call to SDL_Delay(%d)", testDelay);
+  SDLTest_AssertPass("Call to SDL_Delay(%" SDL_PRIu32 ")", testDelay);
   result2 = SDL_GetTicks();
   SDLTest_AssertPass("Call to SDL_GetTicks()");
-  SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %d", result2);
+  SDLTest_AssertCheck(result2 > 0, "Check result value, expected: >0, got: %" SDL_PRIu32, result2);
   difference = result2 - result;
-  SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%d, got: %d", testDelay - marginOfError, difference);
-  SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%d, got: %d", testDelay + marginOfError, difference);
+  SDLTest_AssertCheck(difference > (testDelay - marginOfError), "Check difference, expected: >%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay - marginOfError, difference);
+  SDLTest_AssertCheck(difference < (testDelay + marginOfError), "Check difference, expected: <%" SDL_PRIu32 ", got: %" SDL_PRIu32, testDelay + marginOfError, difference);
 
   return TEST_COMPLETED;
 }
diff --git a/test/testautomation_video.c b/test/testautomation_video.c
index c5b648c..bf0283b 100644
--- a/test/testautomation_video.c
+++ b/test/testautomation_video.c
@@ -346,7 +346,7 @@ video_getWindowFlags(void *arg)
   if (window != NULL) {
       actualFlags = SDL_GetWindowFlags(window);
       SDLTest_AssertPass("Call to SDL_GetWindowFlags()");
-      SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %d", flags, actualFlags);
+      SDLTest_AssertCheck((flags & actualFlags) == flags, "Verify returned value has flags %d set, got: %" SDL_PRIu32, flags, actualFlags);
   }
 
   /* Clean up */
@@ -985,13 +985,13 @@ video_getWindowId(void *arg)
 
   /* Get window from ID */
   result = SDL_GetWindowFromID(id);
-  SDLTest_AssertPass("Call to SDL_GetWindowID(%d)", id);
+  SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 ")", id);
   SDLTest_AssertCheck(result == window, "Verify result matches window pointer");
 
   /* Get window from random large ID, no result check */
   randomId = SDLTest_RandomIntegerInRange(UINT8_MAX,UINT16_MAX);
   result = SDL_GetWindowFromID(randomId);
-  SDLTest_AssertPass("Call to SDL_GetWindowID(%d/random_large)", randomId);
+  SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/random_large)", randomId);
 
   /* Get window from 0 and Uint32 max ID, no result check */
   result = SDL_GetWindowFromID(0);
@@ -1004,7 +1004,7 @@ video_getWindowId(void *arg)
 
   /* Get window from ID for closed window */
   result = SDL_GetWindowFromID(id);
-  SDLTest_AssertPass("Call to SDL_GetWindowID(%d/closed_window)", id);
+  SDLTest_AssertPass("Call to SDL_GetWindowID(%" SDL_PRIu32 "/closed_window)", id);
   SDLTest_AssertCheck(result == NULL, "Verify result is NULL");
 
   /* Negative test */
@@ -1036,7 +1036,7 @@ video_getWindowPixelFormat(void *arg)
   /* Get format */
   format = SDL_GetWindowPixelFormat(window);
   SDLTest_AssertPass("Call to SDL_GetWindowPixelFormat()");
-  SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, "Verify that returned format is valid; expected: != %d, got: %d", SDL_PIXELFORMAT_UNKNOWN, format);
+  SDLTest_AssertCheck(format != SDL_PIXELFORMAT_UNKNOWN, "Verify that returned format is valid; expected: != %d, got: %" SDL_PRIu32, SDL_PIXELFORMAT_UNKNOWN, format);
 
   /* Clean up */
   _destroyVideoSuiteTestWindow(window);
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 6827884..5d87b7a 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -577,28 +577,26 @@ loop(void *arg)
         case SDL_CONTROLLERTOUCHPADDOWN:
         case SDL_CONTROLLERTOUCHPADMOTION:
         case SDL_CONTROLLERTOUCHPADUP:
-            SDL_Log("Controller %d touchpad %d finger %d %s %.2f, %.2f, %.2f\n",
-                event.ctouchpad.which,
-                event.ctouchpad.touchpad,
-                event.ctouchpad.finger,
-                (event.type == SDL_CONTROLLERTOUCHPADDOWN ? "pressed at" :
-                (event.type == SDL_CONTROLLERTOUCHPADUP ? "released at" :
-                "moved to")),
-                event.ctouchpad.x,
-                event.ctouchpad.y,
-                event.ctouchpad.pressure);
+            SDL_Log("Controller %" SDL_PRIs32 " touchpad %" SDL_PRIs32 " finger %" SDL_PRIs32 " %s %.2f, %.2f, %.2f\n",
+                    event.ctouchpad.which,
+                    event.ctouchpad.touchpad,
+                    event.ctouchpad.finger,
+                    (event.type == SDL_CONTROLLERTOUCHPADDOWN ? "pressed at" : (event.type == SDL_CONTROLLERTOUCHPADUP ? "released at" : "moved to")),
+                    event.ctouchpad.x,
+                    event.ctouchpad.y,
+                    event.ctouchpad.pressure);
             break;
 
 #define VERBOSE_SENSORS
 #ifdef VERBOSE_SENSORS
         case SDL_CONTROLLERSENSORUPDATE:
-            SDL_Log("Controller %d sensor %s: %.2f, %.2f, %.2f (%"SDL_PRIu64")\n",
-                event.csensor.which,
-                GetSensorName((SDL_SensorType)event.csensor.sensor),
-                event.csensor.data[0],
-                event.csensor.data[1],
-                event.csensor.data[2],
-                event.csensor.timestamp_us);
+            SDL_Log("Controller %" SDL_PRIs32 " sensor %s: %.2f, %.2f, %.2f (%" SDL_PRIu64 ")\n",
+                    event.csensor.which,
+                    GetSensorName((SDL_SensorType) event.csensor.sensor),
+                    event.csensor.data[0],
+                    event.csensor.data[1],
+                    event.csensor.data[2],
+                    event.csensor.timestamp_us);
             break;
 #endif /* VERBOSE_SENSORS */
 
@@ -608,7 +606,7 @@ loop(void *arg)
             if (event.caxis.value <= (-SDL_JOYSTICK_AXIS_MAX / 2) || event.caxis.value >= (SDL_JOYSTICK_AXIS_MAX / 2)) {
                 SetController(event.caxis.which);
             }
-            SDL_Log("Controller %d axis %s changed to %d\n", event.caxis.which, SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis)event.caxis.axis), event.caxis.value);
+            SDL_Log("Controller %" SDL_PRIs32 " axis %s changed to %d\n", event.caxis.which, SDL_GameControllerGetStringForAxis((SDL_GameControllerAxis) event.caxis.axis), event.caxis.value);
             break;
 #endif /* VERBOSE_AXES */
 
@@ -617,7 +615,7 @@ loop(void *arg)
             if (event.type == SDL_CONTROLLERBUTTONDOWN) {
                 SetController(event.cbutton.which);
             }
-            SDL_Log("Controller %d button %s %s\n", event.cbutton.which, SDL_GameControllerGetStringForButton((SDL_GameControllerButton)event.cbutton.button), event.cbutton.state ? "pressed" : "released");
+            SDL_Log("Controller %" SDL_PRIs32 " button %s %s\n", event.cbutton.which, SDL_GameControllerGetStringForButton((SDL_GameControllerButton) event.cbutton.button), event.cbutton.state ? "pressed" : "released");
 
             /* Cycle PS5 trigger effects when the microphone button is pressed */
             if (event.type == SDL_CONTROLLERBUTTONDOWN &&
@@ -628,7 +626,7 @@ loop(void *arg)
             break;
 
         case SDL_JOYBATTERYUPDATED:
-            SDL_Log("Controller %d battery state changed to %s\n", event.jbattery.which, power_level_strings[event.jbattery.level + 1]);
+            SDL_Log("Controller %" SDL_PRIs32 " battery state changed to %s\n", event.jbattery.which, power_level_strings[event.jbattery.level + 1]);
             break;
 
         case SDL_MOUSEBUTTONDOWN:
diff --git a/test/testhotplug.c b/test/testhotplug.c
index 465fb56..a2fb37b 100644
--- a/test/testhotplug.c
+++ b/test/testhotplug.c
@@ -79,7 +79,7 @@ main(int argc, char *argv[])
                     {
                         joystick = SDL_JoystickOpen(event.jdevice.which);
                         instance = SDL_JoystickInstanceID(joystick);
-                        SDL_Log("Joy Added  : %d : %s\n", event.jdevice.which, SDL_JoystickName(joystick));
+                        SDL_Log("Joy Added  : %" SDL_PRIs32 " : %s\n", event.jdevice.which, SDL_JoystickName(joystick));
                         if (enable_haptic)
                         {
                             if (SDL_JoystickIsHaptic(joystick))
@@ -108,7 +108,7 @@ main(int argc, char *argv[])
                 case SDL_JOYDEVICEREMOVED:
                     if (instance == event.jdevice.which)
                     {
-                        SDL_Log("Joy Removed: %d\n", event.jdevice.which);
+                        SDL_Log("Joy Removed: %" SDL_PRIs32 "\n", event.jdevice.which);
                         instance = -1;
                         if(enable_haptic && haptic)
                         {
diff --git a/test/testime.c b/test/testime.c
index 1558342..9a0b525 100644
--- a/test/testime.c
+++ b/test/testime.c
@@ -213,7 +213,7 @@ static int unifont_init(const char *fontname)
         if (codepoint <= UNIFONT_MAX_CODEPOINT)
         {
             if (unifontGlyph[codepoint].width > 0)
-                SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Ignoring duplicate codepoint 0x%08x in hex file on line %d.\n", codepoint, lineNumber);
+                SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "unifont: Ignoring duplicate codepoint 0x%08" SDL_PRIx32 " in hex file on line %d.\n", codepoint, lineNumber);
             else
             {
                 unifontGlyph[codepoint].width = glyphWidth;
@@ -228,7 +228,7 @@ static int unifont_init(const char *fontname)
     } while (bytesRead > 0);
 
     SDL_RWclose(hexFile);
-    SDL_Log("unifont: Loaded %u glyphs.\n", numGlyphs);
+    SDL_Log("unifont: Loaded %" SDL_PRIu32 " glyphs.\n", numGlyphs);
     return 0;
 }
 
@@ -275,7 +275,7 @@ static int unifont_load_texture(Uint32 textureID)
 
     if (textureID >= UNIFONT_NUM_TEXTURES)
     {
-        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Tried to load out of range texture %u.\n", textureID);
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Tried to load out of range texture %" SDL_PRIu32 "\n", textureID);
         return -1;
     }
 
@@ -309,14 +309,14 @@ static int unifont_load_texture(Uint32 textureID)
         tex = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STATIC, UNIFONT_TEXTURE_WIDTH, UNIFONT_TEXTURE_WIDTH);
         if (tex == NULL)
         {
-            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to create texture %u for renderer %d.\n", textureID, i);
+            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "unifont: Failed to create texture %" SDL_PRIu32 " for renderer %d.\n", textureID, i);
             return -1;
         }
         unifontTexture[UNIFONT_NUM_TEXTURES * i + textureID] = tex;
         SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);
         if (SDL_UpdateTexture(tex, NULL, textureRGBA, UNIFONT_TEXTURE_PITCH) != 0)
         {
-            SDL_Log("unifont error: Failed to update texture %u data for renderer %d.\n", textureID, i);
+            SDL_Log("unifont error: Failed to update texture %" SDL_PRIu32 " data for renderer %d.\n", textureID, i);
         }
     }
 
@@ -762,10 +762,11 @@ int main(int argc, char *argv[])
                         break;
                     }
 
-                    SDL_Log("Keyboard: scancode 0x%08X = %s, keycode 0x%08X = %s\n",
+                    SDL_Log("Keyboard: scancode 0x%08X = %s, keycode 0x%08" SDL_PRIX32 " = %s\n",
                             event.key.keysym.scancode,
                             SDL_GetScancodeName(event.key.keysym.scancode),
-                            event.key.keysym.sym, SDL_GetKeyName(event.key.keysym.sym));
+                            SDL_static_cast(Uint32, event.key.keysym.sym),
+                            SDL_GetKeyName(event.key.keysym.sym));
                     break;
 
                 case SDL_TEXTINPUT:
@@ -787,7 +788,7 @@ int main(int argc, char *argv[])
                     break;
 
                 case SDL_TEXTEDITING:
-                    SDL_Log("text editing \"%s\", selected range (%d, %d)\n",
+                    SDL_Log("text editing \"%s\", selected range (%" SDL_PRIs32 ", %" SDL_PRIs32 ")\n",
                             event.edit.text, event.edit.start, event.edit.length);
 
                     SDL_strlcpy(markedText, event.edit.text, SDL_TEXTEDITINGEVENT_TEXT_SIZE);
diff --git a/test/testjoystick.c b/test/testjoystick.c
index 96f4be1..f058979 100644
--- a/test/testjoystick.c
+++ b/test/testjoystick.c
@@ -87,7 +87,7 @@ PrintJoystick(SDL_Joystick *joy)
     SDL_Log("         balls: %d\n", SDL_JoystickNumBalls(joy));
     SDL_Log("          hats: %d\n", SDL_JoystickNumHats(joy));
     SDL_Log("       buttons: %d\n", SDL_JoystickNumButtons(joy));
-    SDL_Log("   instance id: %d\n", SDL_JoystickInstanceID(joy));
+    SDL_Log("   instance id: %" SDL_PRIs32 "\n", SDL_JoystickInstanceID(joy));
     SDL_Log("          guid: %s\n", guid);
     SDL_Log("       VID/PID: 0x%.4x/0x%.4x\n", SDL_JoystickGetVendor(joy), SDL_JoystickGetProduct(joy));
 }
@@ -137,13 +137,13 @@ loop(void *arg)
             break;
 
         case SDL_JOYAXISMOTION:
-            SDL_Log("Joystick %d axis %d value: %d\n",
-                   event.jaxis.which,
-                   event.jaxis.axis, event.jaxis.value);
+            SDL_Log("Joystick %" SDL_PRIs32 " axis %d value: %d\n",
+                    event.jaxis.which,
+                    event.jaxis.axis, event.jaxis.value);
             break;
         case SDL_JOYHATMOTION:
-            SDL_Log("Joystick %d hat %d value:",
-                   event.jhat.which, event.jhat.hat);
+            SDL_Log("Joystick %" SDL_PRIs32 " hat %d value:",
+                    event.jhat.which, event.jhat.hat);
             if (event.jhat.value == SDL_HAT_CENTERED)
                 SDL_Log(" centered");
             if (event.jhat.value & SDL_HAT_UP)
@@ -157,21 +157,21 @@ loop(void *arg)
             SDL_Log("\n");
             break;
         case SDL_JOYBALLMOTION:
-            SDL_Log("Joystick %d ball %d delta: (%d,%d)\n",
-                   event.jball.which,
-                   event.jball.ball, event.jball.xrel, event.jball.yrel);
+            SDL_Log("Joystick %" SDL_PRIs32 " ball %d delta: (%d,%d)\n",
+                    event.jball.which,
+                    event.jball.ball, event.jball.xrel, event.jball.yrel);
             break;
         case SDL_JOYBUTTONDOWN:
-            SDL_Log("Joystick %d button %d down\n",
-                   event.jbutton.which, event.jbutton.button);
+            SDL_Log("Joystick %" SDL_PRIs32 " button %d down\n",
+                    event.jbutton.which, event.jbutton.button);
             /* First button triggers a 0.5 second full strength rumble */
             if (event.jbutton.button == 0) {
                 SDL_JoystickRumble(joystick, 0xFFFF, 0xFFFF, 500);
             }
             break;
         case SDL_JOYBUTTONUP:
-            SDL_Log("Joystick %d button %d up\n",
-                   event.jbutton.which, event.jbutton.button);
+            SDL_Log("Joystick %" SDL_PRIs32 " button %d up\n",
+                    event.jbutton.which, event.jbutton.button);
             break;
         case SDL_KEYDOWN:
             /* Press the L key to lag for 3 seconds, to see what happens
diff --git a/test/testoffscreen.c b/test/testoffscreen.c
index e6abb35..e5fd721 100644
--- a/test/testoffscreen.c
+++ b/test/testoffscreen.c
@@ -66,8 +66,8 @@ save_surface_to_bmp()
     surface = SDL_CreateRGBSurface(0, width, height, bbp, r_mask, g_mask, b_mask, a_mask);
     SDL_RenderReadPixels(renderer, NULL, pixel_format, (void*)surface->pixels, surface->pitch);
 
-    SDL_snprintf(file, sizeof(file), "SDL_window%d-%8.8d.bmp",
-        SDL_GetWindowID(window), ++frame_number);
+    SDL_snprintf(file, sizeof(file), "SDL_window%" SDL_PRIs32 "-%8.8d.bmp",
+                 SDL_GetWindowID(window), ++frame_number);
 
     SDL_SaveBMP(surface, file);
     SDL_FreeSurface(surface);
@@ -154,7 +154,7 @@ main(int argc, char *argv[])
             now = SDL_GetTicks();
             if (now > then) {
                 double fps = ((double) frames * 1000) / (now - then);
-                SDL_Log("Frames remaining: %i rendering at %2.2f frames per second\n", max_frames - frames, fps);
+                SDL_Log("Frames remaining: %" SDL_PRIu32 " rendering at %2.2f frames per second\n", max_frames - frames, fps);
             }
         }
     }
diff --git a/test/testplatform.c b/test/testplatform.c
index 0ee4ede..5eec9f9 100644
--- a/test/testplatform.c
+++ b/test/testplatform.c
@@ -149,8 +149,9 @@ TestEndian(SDL_bool verbose)
         ++error;
     }
     if (verbose) {
-        SDL_Log("Value 32 = 0x%X, swapped = 0x%X\n", value32,
-               SDL_Swap32(value32));
+        SDL_Log("Value 32 = 0x%" SDL_PRIX32 ", swapped = 0x%" SDL_PRIX32 "\n",
+                value32,
+                SDL_Swap32(value32));
     }
     if (SDL_Swap32(value32) != swapped32) {
         if (verbose) {
diff --git a/test/testrendertarget.c b/test/testrendertarget.c
index 98ceb16..0848beb 100644
--- a/test/testrendertarget.c
+++ b/test/testrendertarget.c
@@ -72,7 +72,7 @@ DrawComposite(DrawState *s)
         SDL_RenderCopy(s->renderer, A, NULL, NULL);
         SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P));
 
-        SDL_Log("Blended pixel: 0x%8.8X\n", P);
+        SDL_Log("Blended pixel: 0x%8.8" SDL_PRIX32 "\n", P);
 
         SDL_DestroyTexture(A);
         SDL_DestroyTexture(B);
diff --git a/test/testsem.c b/test/testsem.c
index eaa2864..bac5127 100644
--- a/test/testsem.c
+++ b/test/testsem.c
@@ -47,11 +47,11 @@ ThreadFuncRealWorld(void *data)
     Thread_State *state = (Thread_State *) data;
     while (alive) {
         SDL_SemWait(sem);
-        SDL_Log("Thread number %d has got the semaphore (value = %d)!\n",
+        SDL_Log("Thread number %d has got the semaphore (value = %" SDL_PRIu32 ")!\n",
                 state->number, SDL_SemValue(sem));
         SDL_Delay(200);
         SDL_SemPost(sem);
-        SDL_Log("Thread number %d has released the semaphore (value = %d)!\n",
+        SDL_Log("Thread number %d has released the semaphore (value = %" SDL_PRIu32 ")!\n",
                 state->number, SDL_SemValue(sem));
         ++state->loop_count;
         SDL_Delay(1);           /* For the scheduler */
@@ -114,7 +114,7 @@ TestWaitTimeout(void)
 
     /* Accept a little offset in the effective wait */
     SDL_assert(duration > 1900 && duration < 2050);
-    SDL_Log("Wait took %d milliseconds\n\n", duration);
+    SDL_Log("Wait took %" SDL_PRIu32 " milliseconds\n\n", duration);
 
     /* Check to make sure the return value indicates timed out */
     if (retval != SDL_MUTEX_TIMEDOUT)
@@ -146,7 +146,7 @@ TestOverheadUncontended(void)
     end_ticks = SDL_GetTicks();
 
     duration = end_ticks - start_ticks;
-    SDL_Log("Took %d milliseconds\n\n", duration);
+    SDL_Log("Took %" SDL_PRIu32 " milliseconds\n\n", duration);
 
     SDL_DestroySemaphore(sem);
 }
@@ -221,9 +221,9 @@ TestOverheadContended(SDL_bool try_wait)
     SDL_assert_release((loop_count - content_count) == NUM_OVERHEAD_OPS * NUM_OVERHEAD_OPS_MULT);
 
     duration = end_ticks - start_ticks;
-    SDL_Log("Took %d milliseconds, threads %s %d out of %d times in total (%.2f%%)\n",
+    SDL_Log("Took %" SDL_PRIu32 " milliseconds, threads %s %d out of %d times in total (%.2f%%)\n",
             duration, try_wait ? "where contended" : "timed out", content_count,
-            loop_count, ((float)content_count * 100) / loop_count);
+            loop_count, ((float) content_count * 100) / loop_count);
     /* Print how many semaphores where consumed per thread */
     SDL_snprintf(textBuffer, sizeof(textBuffer), "{ ");
     for (i = 0; i < NUM_THREADS; ++i) {
diff --git a/test/testsensor.c b/test/testsensor.c
index 658a65b..73dd317 100644
--- a/test/testsensor.c
+++ b/test/testsensor.c
@@ -72,16 +72,16 @@ main(int argc, char **argv)
 
     SDL_Log("There are %d sensors available\n", num_sensors);
     for (i = 0; i < num_sensors; ++i) {
-        SDL_Log("Sensor %d: %s, type %s, platform type %d\n",
-            SDL_SensorGetDeviceInstanceID(i),
-            SDL_SensorGetDeviceName(i),
-            GetSensorTypeString(SDL_SensorGetDeviceType(i)),
-            SDL_SensorGetDeviceNonPortableType(i));
+        SDL_Log("Sensor %" SDL_PRIs32 ": %s, type %s, platform type %d\n",
+                SDL_SensorGetDeviceInstanceID(i),
+                SDL_SensorGetDeviceName(i),
+                GetSensorTypeString(SDL_SensorGetDeviceType(i)),
+                SDL_SensorGetDeviceNonPortableType(i));
 
         if (SDL_SensorGetDeviceType(i) != SDL_SENSOR_UNKNOWN) {
             SDL_Sensor *sensor = SDL_SensorOpen(i);
             if (sensor == NULL) {
-                SDL_Log("Couldn't open sensor %d: %s\n", SDL_SensorGetDeviceInstanceID(i), SDL_GetError());
+                SDL_Log("Couldn't open sensor %" SDL_PRIs32 ": %s\n", SDL_SensorGetDeviceInstanceID(i), SDL_GetError());
             } else {
                 ++num_opened;
             }
diff --git a/test/testtimer.c b/test/testtimer.c
index 62c5cd5..126ba3b 100644
--- a/test/testtimer.c
+++ b/test/testtimer.c
@@ -33,7 +33,7 @@ ticktock(Uint32 interval, void *param)
 static Uint32 SDLCALL
 callback(Uint32 interval, void *param)
 {
-    SDL_Log("Timer %d : param = %d\n", interval, (int) (uintptr_t) param);
+    SDL_Log("Timer %" SDL_PRIu32 " : param = %d\n", interval, (int) (uintptr_t) param);
     return interval;
 }
 
diff --git a/test/testvulkan.c b/test/testvulkan.c
index 3fe047f..4b65179 100644
--- a/test/testvulkan.c
+++ b/test/testvulkan.c
@@ -1101,7 +1101,7 @@ int main(int argc, char **argv)
     }
 
     SDL_GetCurrentDisplayMode(0, &mode);
-    SDL_Log("Screen BPP    : %d\n", SDL_BITSPERPIXEL(mode.format));
+    SDL_Log("Screen BPP    : %" SDL_PRIu32 "\n", SDL_BITSPERPIXEL(mode.format));
     SDL_GetWindowSize(state->windows[0], &dw, &dh);
     SDL_Log("Window Size   : %d,%d\n", dw, dh);
     SDL_Vulkan_GetDrawableSize(state->windows[0], &dw, &dh);
diff --git a/test/testwm2.c b/test/testwm2.c
index 93bedf4..eeb8d8e 100644
--- a/test/testwm2.c
+++ b/test/testwm2.c
@@ -156,20 +156,20 @@ loop()
                 if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
                     SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
                     if (window) {
-                        SDL_Log("Window %d resized to %dx%d\n",
-                            event.window.windowID,
-                            event.window.data1,
-                            event.window.data2);
+                        SDL_Log("Window %" SDL_PRIu32 " resized to %" SDL_PRIs32 "x%" SDL_PRIs32 "\n",
+                                event.window.windowID,
+                                event.window.data1,
+                                event.window.data2);
                     }
                 }
                 if (event.window.event == SDL_WINDOWEVENT_MOVED) {
                     SDL_Window *window = SDL_GetWindowFromID(event.window.windowID);
                     if (window) {
-                        SDL_Log("Window %d moved to %d,%d (display %s)\n",
-                            event.window.windowID,
-                            event.window.data1,
-                            event.window.data2,
-                            SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window)));
+                        SDL_Log("Window %" SDL_PRIu32 " moved to %" SDL_PRIs32 ",%" SDL_PRIs32 " (display %s)\n",
+                                event.window.windowID,
+                                event.window.data1,
+                                event.window.data2,
+                                SDL_GetDisplayName(SDL_GetWindowDisplayIndex(window)));
                     }
                 }
                 if (event.window.event == SDL_WINDOWEVENT_FOCUS_LOST) {
diff --git a/test/testyuv.c b/test/testyuv.c
index 9c89c31..df0d943 100644
--- a/test/testyuv.c
+++ b/test/testyuv.c
@@ -354,7 +354,7 @@ main(int argc, char **argv)
         SDL_ConvertPixels(original->w, original->h, yuv_format, raw_yuv, pitch, rgb_format, converted->pixels, converted->pitch);
     }
     now = SDL_GetTicks();
-    SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "%d iterations in %d ms, %.2fms each\n", iterations, (now - then), (float)(now - then)/iterations);
+    SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "%" SDL_PRIu32 " iterations in %" SDL_PRIu32 " ms, %.2fms each\n", iterations, (now - then), (float) (now - then) / iterations);
 
     window = SDL_CreateWindow("YUV test",
                               SDL_WINDOWPOS_UNDEFINED,