]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-132983: Use ``Py_UNREACHABLE`` in ``_zstd_load_impl()`` (GH-137320) (#137360)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 7 Aug 2025 15:38:15 +0000 (17:38 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Aug 2025 15:38:15 +0000 (18:38 +0300)
Co-authored-by: Rogdham <3994389+Rogdham@users.noreply.github.com>
Modules/_zstd/decompressor.c

index b00ee05d2f51bfc126a64cb93cc87e9ba8a60644..026d39f68291dad3ddce4ca5b9f6374550b83a48 100644 (file)
@@ -157,10 +157,7 @@ _zstd_load_impl(ZstdDecompressor *self, ZstdDict *zd,
                                        zd->dict_len);
     }
     else {
-        /* Impossible code path */
-        PyErr_SetString(PyExc_SystemError,
-                        "load_d_dict() impossible code path");
-        return -1;
+        Py_UNREACHABLE();
     }
 
     /* Check error */