linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] mkfs.f2fs: split unused parameter
@ 2022-05-25  1:04 Jaegeuk Kim
  0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2022-05-25  1:04 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

external/f2fs-tools/mkfs/f2fs_format_utils.c:51:28: error: unused parameter 'i' [-Werror,-Wunused-parameter]

Signed-off-by: Jaegeuk Kim <jaegeuk@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-25  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-25  1:04 [f2fs-dev] [PATCH] mkfs.f2fs: split unused parameter Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).