[Ocfs2-tools-devel] [PATCH] tunefs.ocfs2: fix compile warning

Joseph Qi jiangqi903 at gmail.com
Thu Mar 8 00:42:46 PST 2018


Using correct prototype of handle_arginfo to clear the following
compile warning:

op_query.c:328:2: warning: passing argument 3 of ‘register_printf_function’ from incompatible pointer type [enabled by default]
In file included from op_query.c:21:0:
/usr/include/printf.h:106:12: note: expected ‘int (*)(const struct printf_info *, size_t,  int *)’ but argument is of type ‘int (*)(const struct printf_info *, size_t,  int *, int *)’
 extern int register_printf_function (int __spec, printf_function __func,
            ^

Fixes: 3e692a9a0ee2 ("vendor: rhel5: fix build failure")
Signed-off-by: Joseph Qi <jiangqi903 at gmail.com>
Cc: Junxiao Bi <junxiao.bi at oracle.com>
---
 tunefs.ocfs2/op_query.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tunefs.ocfs2/op_query.c b/tunefs.ocfs2/op_query.c
index 295c185..b937722 100644
--- a/tunefs.ocfs2/op_query.c
+++ b/tunefs.ocfs2/op_query.c
@@ -222,8 +222,7 @@ static int handle_ro_compat(FILE *stream, const struct printf_info *info,
 	return len;
 }
 
-static int handle_arginfo(const struct printf_info *info, size_t n, int *types,
-		int *size)
+static int handle_arginfo(const struct printf_info *info, size_t n, int *types)
 {
 	return 0;
 }
-- 
1.8.3.1



More information about the Ocfs2-tools-devel mailing list