Skip to content

Commit db3065a

Browse files
interpreters/bas: Fix compiler warning after gcc upgrade to version 12
bas_token.l: In function 'yylex': Error: bas_token.l:1210:31: error: 'strcpy' writing 1 or more bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 1210 | } | ^ In file included from bas_auto.h:77, from bas_token.l:16: bas_token.h:103:8: note: at offset 2 into destination object 'name' of size 2 103 | char name[2/* ... */]; | ^~~~ Signed-off-by: Xiang Xiao <[email protected]>
1 parent fcd0729 commit db3065a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interpreters/bas/bas_token.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct Identifier
100100
{
101101
struct Symbol *sym;
102102
enum ValueType defaultType;
103-
char name[2/* ... */];
103+
char name[0];
104104
};
105105

106106
struct Next

0 commit comments

Comments
 (0)