misc: Make VLAs a warning
This commit is contained in:
parent
3c34f4a66a
commit
e898ef0425
@ -53,6 +53,7 @@ override INTERNAL_CFLAGS := \
|
|||||||
-nostdinc \
|
-nostdinc \
|
||||||
-Wno-address-of-packed-member \
|
-Wno-address-of-packed-member \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
|
-Wvla \
|
||||||
-mno-80387 \
|
-mno-80387 \
|
||||||
-mno-mmx \
|
-mno-mmx \
|
||||||
-mno-3dnow \
|
-mno-3dnow \
|
||||||
|
@ -271,13 +271,16 @@ next:
|
|||||||
¤t_inode, fd, alloc_map);
|
¤t_inode, fd, alloc_map);
|
||||||
|
|
||||||
// name read
|
// name read
|
||||||
char name[dir->name_len + 1];
|
char *name = ext_mem_alloc(dir->name_len + 1);
|
||||||
|
|
||||||
memset(name, 0, dir->name_len + 1);
|
memset(name, 0, dir->name_len + 1);
|
||||||
inode_read(name, i + sizeof(struct ext2_dir_entry), dir->name_len,
|
inode_read(name, i + sizeof(struct ext2_dir_entry), dir->name_len,
|
||||||
¤t_inode, fd, alloc_map);
|
¤t_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) {
|
if (escape) {
|
||||||
ret = true;
|
ret = true;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -31,6 +31,8 @@ override INTERNAL_CFLAGS := \
|
|||||||
-fomit-frame-pointer \
|
-fomit-frame-pointer \
|
||||||
-nostdinc \
|
-nostdinc \
|
||||||
-Wno-address-of-packed-member \
|
-Wno-address-of-packed-member \
|
||||||
|
-Wshadow \
|
||||||
|
-Wvla \
|
||||||
-mno-80387 \
|
-mno-80387 \
|
||||||
-mno-mmx \
|
-mno-mmx \
|
||||||
-mno-3dnow \
|
-mno-3dnow \
|
||||||
|
Loading…
Reference in New Issue
Block a user