Skip to content

Commit 6fb2704

Browse files
torvaldsglebm
authored andcommitted
gcc-10 warnings: fix low-hanging fruit
Backport of 9d82973 Original description below --- Due to a bug-report that was compiler-dependent, I updated one of my machines to gcc-10. That shows a lot of new warnings. Happily they seem to be mostly the valid kind, but it's going to cause a round of churn for getting rid of them.. This is the really low-hanging fruit of removing a couple of zero-sized arrays in some core code. We have had a round of these patches before, and we'll have many more coming, and there is nothing special about these except that they were particularly trivial, and triggered more warnings than most. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 7eae4ba commit 6fb2704

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ struct file_handle {
938938
__u32 handle_bytes;
939939
int handle_type;
940940
/* file identifier */
941-
unsigned char f_handle[0];
941+
unsigned char f_handle[];
942942
};
943943

944944
static inline struct file *get_file(struct file *f)

include/linux/tty.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct tty_buffer {
6464
int read;
6565
int flags;
6666
/* Data points here */
67-
unsigned long data[0];
67+
unsigned long data[];
6868
};
6969

7070
/* Values for .flags field of tty_buffer */

0 commit comments

Comments
 (0)