external/f2fs-tools/mkfs/f2fs_format_utils.c:51:28: error: unused parameter 'i' [-Werror,-Wunused-parameter]
Signed-off-by: Jaegeuk Kim <jaeg...@kernel.org> --- mkfs/f2fs_format_utils.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c index e3c58936e968..fdd0235d81aa 100644 --- a/mkfs/f2fs_format_utils.c +++ b/mkfs/f2fs_format_utils.c @@ -48,10 +48,10 @@ #endif #endif -static int trim_device(int i) -{ #if defined(FALLOC_FL_PUNCH_HOLE) || defined(BLKDISCARD) || \ defined(BLKSECDISCARD) +static int trim_device(int i) +{ unsigned long long range[2]; struct stat *stat_buf; struct device_info *dev = c.devices + i; @@ -110,13 +110,18 @@ static int trim_device(int i) } #endif free(stat_buf); -#endif return 0; } +#else +static int trim_device(int UNUSED(i)) +{ + return 0; +} +#endif +#ifdef WITH_ANDROID static bool is_wiped_device(int i) { -#ifdef WITH_ANDROID struct device_info *dev = c.devices + i; int fd = dev->fd; char *buf, *zero_buf; @@ -157,9 +162,11 @@ static bool is_wiped_device(int i) MSG(0, "Info: Found all zeros in first %d blocks\n", nblocks); return wiped; #else +static bool is_wiped_device(int UNUSED(i)) +{ return false; -#endif } +#endif int f2fs_trim_devices(void) { -- 2.36.1.124.g0e6072fb45-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel