]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-102941: Fix "‘subobj’ may be used uninitialized in this function" warning in ...
authorNikita Sobolev <mail@sobolevn.me>
Mon, 27 Mar 2023 00:05:06 +0000 (03:05 +0300)
committerGitHub <noreply@github.com>
Mon, 27 Mar 2023 00:05:06 +0000 (17:05 -0700)
Objects/bytes_methods.c

index 6b8166385d375b850c559988c8deabde349e883a..ef9e65e566ece90c3a880b97f8c9e179faa977e1 100644 (file)
@@ -774,7 +774,7 @@ _Py_bytes_tailmatch(const char *str, Py_ssize_t len,
 {
     Py_ssize_t start = 0;
     Py_ssize_t end = PY_SSIZE_T_MAX;
-    PyObject *subobj;
+    PyObject *subobj = NULL;
     int result;
 
     if (!stringlib_parse_args_finds(function_name, args, &subobj, &start, &end))