From 2729b68141d6bbb0274a7bd61ebcdb23d5f6e344 Mon Sep 17 00:00:00 2001 From: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com> Date: Wed, 13 Mar 2024 00:10:09 +0300 Subject: [PATCH] remove pointless variable initializations in unicode_format --- Objects/stringlib/unicode_format.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h index 91c71ab5736c25..707ecb62032025 100644 --- a/Objects/stringlib/unicode_format.h +++ b/Objects/stringlib/unicode_format.h @@ -321,14 +321,13 @@ field_name_split(PyObject *str, Py_ssize_t start, Py_ssize_t end, SubString *fir Py_ssize_t *first_idx, FieldNameIterator *rest, AutoNumber *auto_number) { - Py_UCS4 c; Py_ssize_t i = start; int field_name_is_empty; int using_numeric_index; /* find the part up until the first '.' or '[' */ while (i < end) { - switch (c = PyUnicode_READ_CHAR(str, i++)) { + switch (PyUnicode_READ_CHAR(str, i++)) { case '[': case '.': /* backup so that we this character is available to the @@ -620,7 +619,7 @@ parse_field(SubString *str, SubString *field_name, SubString *format_spec, format_spec->start = str->start; count = 1; while (str->start < str->end) { - switch ((c = PyUnicode_READ_CHAR(str->str, str->start++))) { + switch (PyUnicode_READ_CHAR(str->str, str->start++)) { case '{': *format_spec_needs_expanding = 1; count++;