mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 01:59:54 +00:00
mkfs/f2fs_format.c: Suppress a compiler warning
commit 98f7f56cf35c352c1ff3d83ad1e72e5b1e5fdf84 category: bugfix issue: #I6VAS0 CVE: NA Signed-off-by: DongSenhao <dongsenhao2@huawei.com> --------------------------------------- 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> Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
20a09c8920
commit
eeba3ae145
@ -1652,7 +1652,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);
|
||||
|
Loading…
Reference in New Issue
Block a user