linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [f2fs-dev] [PATCH] mkfs.f2fs: split unused parameter
Date: Tue, 24 May 2022 18:04:54 -0700	[thread overview]
Message-ID: <20220525010454.2661808-1-jaegeuk@kernel.org> (raw)

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

                 reply	other threads:[~2022-05-25  1:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220525010454.2661808-1-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).