summaryrefslogtreecommitdiffstatshomepage
path: root/lib/littlefs/lfs1.c
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-05-09 14:34:09 +1000
committerAngus Gratton <gus@projectgus.com>2025-05-09 18:31:40 +1000
commitae6062a45a776e193e8c02ece62d058b64f2b4f5 (patch)
treea9aaf303c1092df49e9d6b9712241b33c26a1f72 /lib/littlefs/lfs1.c
parent9f8600588584cb58fcc5593f18b090622a406565 (diff)
downloadmicropython-ae6062a45a776e193e8c02ece62d058b64f2b4f5.tar.gz
micropython-ae6062a45a776e193e8c02ece62d058b64f2b4f5.zip
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 <angus@redyak.com.au>
Diffstat (limited to 'lib/littlefs/lfs1.c')
-rw-r--r--lib/littlefs/lfs1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/littlefs/lfs1.c b/lib/littlefs/lfs1.c
index 6a3fd67001..ec18dc4702 100644
--- a/lib/littlefs/lfs1.c
+++ b/lib/littlefs/lfs1.c
@@ -2141,7 +2141,7 @@ int lfs1_format(lfs1_t *lfs1, const struct lfs1_config *cfg) {
.d.elen = sizeof(superblock.d) - sizeof(superblock.d.magic) - 4,
.d.nlen = sizeof(superblock.d.magic),
.d.version = LFS1_DISK_VERSION,
- .d.magic = {"littlefs"},
+ .d.magic = {'l', 'i', 't', 't', 'l', 'e', 'f', 's'},
.d.block_size = lfs1->cfg->block_size,
.d.block_count = lfs1->cfg->block_count,
.d.root = {lfs1->root[0], lfs1->root[1]},