File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -6071,7 +6071,7 @@ static void doswitch(void)
6071
6071
int swdefault ,casecount ;
6072
6072
int tok ,endtok ;
6073
6073
int swtag ,csetag ;
6074
- int enumsymcount , diff ;
6074
+ int enumsymcount ;
6075
6075
int save_fline ;
6076
6076
symbol * enumsym ,* csesym ;
6077
6077
int ident ;
@@ -6219,7 +6219,7 @@ static void doswitch(void)
6219
6219
} while (tok != endtok );
6220
6220
restoreassignments (pc_nestlevel + 1 ,assignments );
6221
6221
6222
- if (enumsym != NULL && swdefault == FALSE && ( diff = enumsym -> x .tags .unique - enumsymcount ) <=2 ) {
6222
+ if (enumsym != NULL && swdefault == FALSE && enumsym -> x .tags .unique - enumsymcount <=2 ) {
6223
6223
constvalue_root * enumlist = enumsym -> dim .enumlist ;
6224
6224
constvalue * val ,* prev = NULL ,* save_next = NULL ;
6225
6225
for (val = enumlist -> first ; val != NULL ; prev = val ,val = val -> next ) {
@@ -6237,8 +6237,9 @@ static void doswitch(void)
6237
6237
/* check if the value of this constant is handled in switch, if so - continue */
6238
6238
if (find_constval_byval (& caselist ,val -> value )!= NULL )
6239
6239
continue ;
6240
+ errorset (sSETPOS ,save_fline );
6240
6241
error (244 ,val -> name ); /* enum element not handled in switch */
6241
- /* */
6242
+ errorset ( sSETPOS , -1 );
6242
6243
} /* while */
6243
6244
} /* if */
6244
6245
Original file line number Diff line number Diff line change 1
1
{
2
2
' test_type ' : ' output_check' ,
3
3
' errors ' : " " "
4
- warning_244.pwn(37 ) : warning 244: enum element " CONST2_3" not handled in switch
5
- warning_244.pwn(37 ) : warning 244: enum element "CONST2_5" not handled in switch
4
+ warning_244.pwn(30 ) : warning 244: enum element " CONST2_3" not handled in switch
5
+ warning_244.pwn(30 ) : warning 244: enum element "CONST2_5" not handled in switch
6
6
" " "
7
7
}
You can’t perform that action at this time.
0 commit comments