misc: Make VLAs a warning

This commit is contained in:
mintsuki 2022-02-18 01:09:51 +01:00
parent 3c34f4a66a
commit e898ef0425
3 changed files with 8 additions and 2 deletions

View File

@ -53,6 +53,7 @@ override INTERNAL_CFLAGS := \
-nostdinc \
-Wno-address-of-packed-member \
-Wshadow \
-Wvla \
-mno-80387 \
-mno-mmx \
-mno-3dnow \

View File

@ -271,13 +271,16 @@ next:
&current_inode, fd, alloc_map);
// name read
char name[dir->name_len + 1];
char *name = ext_mem_alloc(dir->name_len + 1);
memset(name, 0, dir->name_len + 1);
inode_read(name, i + sizeof(struct ext2_dir_entry), dir->name_len,
&current_inode, fd, alloc_map);
if (!strcmp(token, name)) {
int test = strcmp(token, name);
pmm_free(name, dir->name_len + 1);
if (test == 0) {
if (escape) {
ret = true;
goto out;

View File

@ -31,6 +31,8 @@ override INTERNAL_CFLAGS := \
-fomit-frame-pointer \
-nostdinc \
-Wno-address-of-packed-member \
-Wshadow \
-Wvla \
-mno-80387 \
-mno-mmx \
-mno-3dnow \