Skip to content

Commit 4e74872

Browse files
Brahmajit Dasbrauner
authored andcommitted
vboxsf: fix building with GCC 15
Building with GCC 15 results in build error fs/vboxsf/super.c:24:54: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization] 24 | static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375"; | ^~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Due to GCC having enabled -Werror=unterminated-string-initialization[0] by default. Separately initializing each array element of VBSF_MOUNT_SIGNATURE to ensure NUL termination, thus satisfying GCC 15 and fixing the build error. [0]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization Signed-off-by: Brahmajit Das <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 0fac3ed commit 4e74872

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/vboxsf/super.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
#define VBOXSF_SUPER_MAGIC 0x786f4256 /* 'VBox' little endian */
2323

24-
static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375";
24+
static const unsigned char VBSF_MOUNT_SIGNATURE[4] = { '\000', '\377', '\376',
25+
'\375' };
2526

2627
static int follow_symlinks;
2728
module_param(follow_symlinks, int, 0444);

0 commit comments

Comments
 (0)