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 <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-12-09 12:44:47 +08:00 committed by Xiang Xiao
parent 1334306585
commit f28797cddf

View File

@ -100,7 +100,7 @@ struct Identifier
{
struct Symbol *sym;
enum ValueType defaultType;
char name[2/* ... */];
char name[0];
};
struct Next