* [PATCH 1/2] f2fscrypt: avoid to fail android build
@ 2019-03-04 22:17 Jaegeuk Kim
  2019-03-04 22:17 ` [PATCH 2/2] f2fs-tools: add c++ for UNUSED Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Jaegeuk Kim @ 2019-03-04 22:17 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim
This fixes some static build errors.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 include/android_config.h | 4 ----
 tools/f2fscrypt.c        | 8 +++++---
 tools/f2fstat.c          | 2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/include/android_config.h b/include/android_config.h
index 4582887..0613400 100644
--- a/include/android_config.h
+++ b/include/android_config.h
@@ -18,13 +18,11 @@
 #define HAVE_SYS_XATTR_H 1
 #define HAVE_UNISTD_H 1
 
-#define HAVE_ADD_KEY 1
 #define HAVE_FALLOCATE 1
 #define HAVE_FSETXATTR 1
 #define HAVE_FSTAT 1
 #define HAVE_FSTAT64 1
 #define HAVE_GETMNTENT 1
-#define HAVE_KEYCTL 1
 #define HAVE_LLSEEK 1
 #define HAVE_LSEEK64 1
 #define HAVE_MEMSET 1
@@ -48,13 +46,11 @@
 #define HAVE_SYS_XATTR_H 1
 #define HAVE_UNISTD_H 1
 
-#define HAVE_ADD_KEY 1
 #define HAVE_FALLOCATE 1
 #define HAVE_FSETXATTR 1
 #define HAVE_FSTAT 1
 #define HAVE_FSTAT64 1
 #define HAVE_GETMNTENT 1
-#define HAVE_KEYCTL 1
 #define HAVE_LLSEEK 1
 #define HAVE_MEMSET 1
 
diff --git a/tools/f2fscrypt.c b/tools/f2fscrypt.c
index 81ef830..fe3e0ff 100644
--- a/tools/f2fscrypt.c
+++ b/tools/f2fscrypt.c
@@ -275,7 +275,8 @@ static void clear_secrets(void)
 	memset(in_passphrase, 0, sizeof(in_passphrase));
 }
 
-static void die_signal_handler(int signum, siginfo_t *siginfo, void *context)
+static void die_signal_handler(int UNUSED(signum),
+		siginfo_t *UNUSED(siginfo), void *UNUSED(context))
 {
 	clear_secrets();
 	exit(-1);
@@ -837,7 +838,8 @@ static void do_get_policy(int argc, char **argv, const struct cmd_desc *cmd)
 "Give the invoking process (typically a shell) a new session keyring,\n" \
 "discarding its old session keyring.\n"
 
-static void do_new_session(int argc, char **argv, const struct cmd_desc *cmd)
+static void do_new_session(int argc, char **UNUSED(argv),
+					const struct cmd_desc *cmd)
 {
 	long keyid, ret;
 
@@ -872,7 +874,7 @@ const struct cmd_desc cmd_list[] = {
 	{ NULL, NULL, NULL, NULL, 0 }
 };
 
-static void do_help(int argc, char **argv, const struct cmd_desc *cmd)
+static void do_help(int argc, char **argv, const struct cmd_desc *UNUSED(cmd))
 {
 	const struct cmd_desc *p;
 
diff --git a/tools/f2fstat.c b/tools/f2fstat.c
index 7f485b0..e0b1677 100644
--- a/tools/f2fstat.c
+++ b/tools/f2fstat.c
@@ -81,7 +81,7 @@ void f2fstat(struct options *opt)
 	int ret;
 	char keyname[32];
 	char buf[4096];
-	struct mm_table key = { keyname, NULL };
+	struct mm_table key = { keyname, NULL, 0 };
 	struct mm_table *found;
 	int f2fstat_table_cnt;
 	char *head, *tail;
-- 
2.19.0.605.g01d371f741-goog
^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [PATCH 2/2] f2fs-tools: add c++ for UNUSED
  2019-03-04 22:17 [PATCH 1/2] f2fscrypt: avoid to fail android build Jaegeuk Kim
@ 2019-03-04 22:17 ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2019-03-04 22:17 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim
From: Jaegeuk Kim <jaegeuk@google.com>
This can avoid build failure for f2fscrypt.
Change-Id: I33eddc62eea486dc219c25d089112e011864dd4f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
---
 include/f2fs_fs.h       | 2 ++
 tools/f2fs_io/f2fs_io.h | 2 ++
 2 files changed, 4 insertions(+)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index a730688..8d1490c 100644
--- a/include/f2fs_fs.h
+++ b/include/f2fs_fs.h
@@ -52,6 +52,8 @@
 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
 #elif defined(__LCLINT__)
 # define UNUSED(x) x
+#elif defined(__cplusplus)
+# define UNUSED(x)
 #else
 # define UNUSED(x) x
 #endif
diff --git a/tools/f2fs_io/f2fs_io.h b/tools/f2fs_io/f2fs_io.h
index 6b619bd..95fd5be 100644
--- a/tools/f2fs_io/f2fs_io.h
+++ b/tools/f2fs_io/f2fs_io.h
@@ -17,6 +17,8 @@
 # define UNUSED(x) UNUSED_ ## x __attribute__((unused))
 #elif defined(__LCLINT__)
 # define UNUSED(x) x
+#elif defined(__cplusplus)
+# define UNUSED(x)
 #else
 # define UNUSED(x) x
 #endif
-- 
2.19.0.605.g01d371f741-goog
^ permalink raw reply related	[flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-04 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-04 22:17 [PATCH 1/2] f2fscrypt: avoid to fail android build Jaegeuk Kim
2019-03-04 22:17 ` [PATCH 2/2] f2fs-tools: add c++ for UNUSED 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).