]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332)
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 21 Oct 2020 08:55:38 +0000 (01:55 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Oct 2020 08:55:38 +0000 (17:55 +0900)
Fix the compiler warning:

format specifies type `wint_t` (aka `int`) but the argument has type `unsigned int`
(cherry picked from commit c322948892438a387d752ec18d1eb512699a4d67)

Co-authored-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
Python/initconfig.c

index b28e0a076468eb263392c52f74341358bd638374..69711d8eab3fc0ba0bd75333bb777d1f2b249763 100644 (file)
@@ -2593,7 +2593,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);