Fixed format string warnings.
authorArmin Novak <armin.novak@gmail.com>
Sat, 11 Apr 2020 07:42:28 +0000 (09:42 +0200)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 28 Apr 2020 12:03:19 +0000 (14:03 +0200)
libfreerdp/primitives/test/TestPrimitivesColors.c
winpr/libwinpr/crt/test/TestUnicodeConversion.c

index 5fe2dca..16ab11f 100644 (file)
@@ -93,8 +93,8 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_func(prim_size_t roi, DWORD DstFormat)
 
                        if (o1 != o2)
                        {
-                               printf("RGBToRGB_16s8u_P3AC4R FAIL: out1[%d]=0x%08" PRIx32 " out2[%d]=0x%08" PRIx32
-                                      "\n",
+                               printf("RGBToRGB_16s8u_P3AC4R FAIL: out1[%" PRIu64 "]=0x%08" PRIx8 " out2[%" PRIu64
+                                      "]=0x%08" PRIx8 "\n",
                                       i, out1[i], i, out2[i]);
                                failed = TRUE;
                        }
index 5b0f5e4..395be32 100644 (file)
@@ -433,7 +433,7 @@ static BOOL test_ConvertToUnicode_wrapper(void)
        }
        if ((i = _wcslen(dst)) != 16)
        {
-               fprintf(stderr, "ConvertToUnicode failure A3: dst length is %d instead of 16\n", i);
+               fprintf(stderr, "ConvertToUnicode failure A3: dst length is %" PRIuz " instead of 16\n", i);
                goto fail;
        }
        if (_wcscmp(dst, (const WCHAR*)cmp0))
@@ -455,7 +455,8 @@ static BOOL test_ConvertToUnicode_wrapper(void)
        i = ConvertToUnicode(CP_UTF8, 0, src2, -1, &dst, 0);
        if (i != 17)
        {
-               fprintf(stderr, "ConvertToUnicode failure B1: unexpectedly returned %d instead of 17\n", i);
+               fprintf(stderr,
+                       "ConvertToUnicode failure B1: unexpectedly returned %" PRIuz " instead of 17\n", i);
                goto fail;
        }
        if (dst == NULL)
@@ -465,7 +466,7 @@ static BOOL test_ConvertToUnicode_wrapper(void)
        }
        if ((i = _wcslen(dst)) != 16)
        {
-               fprintf(stderr, "ConvertToUnicode failure B3: dst length is %d instead of 16\n", i);
+               fprintf(stderr, "ConvertToUnicode failure B3: dst length is %" PRIuz " instead of 16\n", i);
                goto fail;
        }
        if (_wcscmp(dst, (WCHAR*)cmp0))
@@ -490,6 +491,9 @@ fail:
 
 int TestUnicodeConversion(int argc, char* argv[])
 {
+       WINPR_UNUSED(argc);
+       WINPR_UNUSED(argv);
+
        /* Letters */
 
        printf("Letters\n");