@@ -20,7 +20,7 @@ append_formattedvalue(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec);
2020static int
2121append_charp (_PyUnicodeWriter * writer , const char * charp )
2222{
23- return _PyUnicodeWriter_WriteASCIIString (writer , charp , -1 );
23+ return _PyUnicodeWriter_WriteASCIIString (writer , charp , -1 );
2424}
2525
2626static int
@@ -100,6 +100,8 @@ append_ast_binop(_PyUnicodeWriter *writer, expr_ty e, bool omit_parens)
100100 case BitAnd : op = " & " ; break ;
101101 case FloorDiv : op = " // " ; break ;
102102 case Pow : op = " ** " ; break ;
103+ default :
104+ Py_UNREACHABLE ();
103105 }
104106
105107 if (-1 == append_charp (writer , op )) {
@@ -127,6 +129,8 @@ append_ast_unaryop(_PyUnicodeWriter *writer, expr_ty e, bool omit_parens)
127129 case Not : op = "not " ; break ;
128130 case UAdd : op = "+" ; break ;
129131 case USub : op = "-" ; break ;
132+ default :
133+ Py_UNREACHABLE ();
130134 }
131135
132136 if (-1 == append_charp (writer , op )) {
@@ -856,7 +860,7 @@ append_formattedvalue(_PyUnicodeWriter *writer, expr_ty e, bool is_format_spec)
856860 return -1 ;
857861 }
858862 }
859- if (e -> v .FormattedValue .format_spec > 0 ) {
863+ if (e -> v .FormattedValue .format_spec ) {
860864 if (-1 == _PyUnicodeWriter_WriteASCIIString (writer , ":" , 1 ) ||
861865 -1 == append_fstring_element (writer ,
862866 e -> v .FormattedValue .format_spec ,
@@ -1119,7 +1123,7 @@ append_ast_expr(_PyUnicodeWriter *writer, expr_ty e, bool omit_parens)
11191123}
11201124
11211125static int
1122- maybe_init_static_strings ()
1126+ maybe_init_static_strings (void )
11231127{
11241128 if (!_str_open_br &&
11251129 !(_str_open_br = PyUnicode_InternFromString ("{" ))) {
0 commit comments