]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332)
authorSamuel Marks <807580+SamuelMarks@users.noreply.github.com>
Mon, 21 Sep 2020 08:35:17 +0000 (18:35 +1000)
committerGitHub <noreply@github.com>
Mon, 21 Sep 2020 08:35:17 +0000 (10:35 +0200)
Fix the compiler warning:

format specifies type `wint_t` (aka `int`) but the argument has type `unsigned int`

Python/initconfig.c

index 880e145ec031cd10ac2b2a03a44fb7ef765db21b..6a13dc52ed776ceee2980947ea0b84c2da32fa2b 100644 (file)
@@ -2674,7 +2674,7 @@ init_dump_ascii_wstr(const wchar_t *str)
         if (ch == L'\'') {
             PySys_WriteStderr("\\'");
         } else if (0x20 <= ch && ch < 0x7f) {
-            PySys_WriteStderr("%lc", ch);
+            PySys_WriteStderr("%c", ch);
         }
         else if (ch <= 0xff) {
             PySys_WriteStderr("\\x%02x", ch);