Skip to content

Commit 1d83528

Browse files
projectgusdhalbert
authored andcommitted
lib/littlefs: Fix string initializer in lfs1.c.
Avoids the new Wunterminated-string-literal when compiled with gcc 15.1. It would be preferable to just disable this warning, but Clang -Wunknown-warning-option kicks in even when disabling warnings so this becomes fiddly to apply. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent de2efe0 commit 1d83528

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/littlefs/lfs1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ int lfs1_format(lfs1_t *lfs1, const struct lfs1_config *cfg) {
21412141
.d.elen = sizeof(superblock.d) - sizeof(superblock.d.magic) - 4,
21422142
.d.nlen = sizeof(superblock.d.magic),
21432143
.d.version = LFS1_DISK_VERSION,
2144-
.d.magic = {"littlefs"},
2144+
.d.magic = {'l', 'i', 't', 't', 'l', 'e', 'f', 's'},
21452145
.d.block_size = lfs1->cfg->block_size,
21462146
.d.block_count = lfs1->cfg->block_count,
21472147
.d.root = {lfs1->root[0], lfs1->root[1]},

0 commit comments

Comments
 (0)