]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45666: fixes warning with `swprintf` and `%s` (GH-29307)
authorNikita Sobolev <mail@sobolevn.me>
Sun, 31 Oct 2021 02:13:54 +0000 (05:13 +0300)
committerGitHub <noreply@github.com>
Sun, 31 Oct 2021 02:13:54 +0000 (10:13 +0800)
Misc/NEWS.d/next/Build/2021-10-29-12-54-53.bpo-45666.w2G63u.rst [new file with mode: 0644]
Programs/_testembed.c

diff --git a/Misc/NEWS.d/next/Build/2021-10-29-12-54-53.bpo-45666.w2G63u.rst b/Misc/NEWS.d/next/Build/2021-10-29-12-54-53.bpo-45666.w2G63u.rst
new file mode 100644 (file)
index 0000000..8a3e6fe
--- /dev/null
@@ -0,0 +1 @@
+Fix warning of ``swprintf`` and ``%s`` usage in ``_testembed.c``
index 6fe18d93a73ae63130366681e7cb1d362fd4bb0a..1ed3bd00edff609b44ac2d5912e5eb0e1bf36e76 100644 (file)
@@ -1733,7 +1733,7 @@ static int check_use_frozen_modules(const char *rawval)
     if (rawval == NULL) {
         wcscpy(optval, L"frozen_modules");
     }
-    else if (swprintf(optval, 100, L"frozen_modules=%s", rawval) < 0) {
+    else if (swprintf(optval, 100, L"frozen_modules=%S", rawval) < 0) {
         error("rawval is too long");
         return -1;
     }