]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132983: Use ``Py_UNREACHABLE`` in ``_zstd_load_impl()`` (#137320)
authorRogdham <3994389+Rogdham@users.noreply.github.com>
Mon, 4 Aug 2025 01:36:12 +0000 (03:36 +0200)
committerGitHub <noreply@github.com>
Mon, 4 Aug 2025 01:36:12 +0000 (02:36 +0100)
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 */