diff options
author | Bart Van Assche <bvanassche@acm.org> | 2022-04-21 15:18:25 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-04-22 12:42:51 -0700 |
commit | 98f7f56cf35c352c1ff3d83ad1e72e5b1e5fdf84 (patch) | |
tree | 41e2b38802a723e7617211efde66c8967836475d | |
parent | ef011a49f3c640c59c7e21c3816d01c039711c58 (diff) | |
download | f2fs-tools-98f7f56cf35c352c1ff3d83ad1e72e5b1e5fdf84.tar.gz |
mkfs/f2fs_format.c: Suppress a compiler warning
Suppress the following compiler warning:
f2fs_format.c:1653:37: warning: adding 'int' to a string does not append to the
string [-Wstring-plus-int]
memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN,
~~~~^~~~~~~~~~~~~~~
f2fs_format.c:1653:37: note: use array indexing to silence this warning
memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN,
^
& [ ]
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | mkfs/f2fs_format.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c index 173f619..6f2761c 100644 --- a/mkfs/f2fs_format.c +++ b/mkfs/f2fs_format.c @@ -1650,7 +1650,7 @@ static int f2fs_add_default_dentry_root(void) dent_blk->dentry[2].file_type = F2FS_FT_DIR; memcpy(dent_blk->filename[2], LPF, F2FS_SLOT_LEN); - memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN, + memcpy(dent_blk->filename[3], &LPF[F2FS_SLOT_LEN], len - F2FS_SLOT_LEN); test_and_set_bit_le(2, dent_blk->dentry_bitmap); |