[CRIU] [PATCH] criu: Fix strict prototypes

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 28 02:37:03 PDT 2016


To make compiler happy with -Wstrict-prototypes option.
No func change.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/arch/x86/include/asm/types.h | 2 +-
 criu/include/sockets.h            | 2 +-
 criu/pie/parasite.c               | 6 +++---
 criu/sockets.c                    | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/criu/arch/x86/include/asm/types.h b/criu/arch/x86/include/asm/types.h
index 58bc59919593..7dac3e5ad918 100644
--- a/criu/arch/x86/include/asm/types.h
+++ b/criu/arch/x86/include/asm/types.h
@@ -145,7 +145,7 @@ typedef struct {
 # define TASK_SIZE	(0xffffe000)
 #endif
 
-static inline unsigned long task_size() { return TASK_SIZE; }
+static inline unsigned long task_size(void) { return TASK_SIZE; }
 
 typedef u64 auxv_t;
 
diff --git a/criu/include/sockets.h b/criu/include/sockets.h
index 50fddb0babb7..89a60a79a10f 100644
--- a/criu/include/sockets.h
+++ b/criu/include/sockets.h
@@ -29,7 +29,7 @@ extern int dump_socket_opts(int sk, SkOptsEntry *soe);
 extern int restore_socket_opts(int sk, SkOptsEntry *soe);
 extern void release_skopts(SkOptsEntry *);
 extern int restore_prepare_socket(int sk);
-extern void preload_socket_modules();
+extern void preload_socket_modules(void);
 
 extern bool socket_test_collect_bit(unsigned int family, unsigned int proto);
 
diff --git a/criu/pie/parasite.c b/criu/pie/parasite.c
index 6a633168eeff..11f4cbf5f831 100644
--- a/criu/pie/parasite.c
+++ b/criu/pie/parasite.c
@@ -314,7 +314,7 @@ static int pie_atoi(char *str)
 	return ret;
 }
 
-static int get_proc_fd()
+static int get_proc_fd(void)
 {
 	int ret;
 	char buf[11];
@@ -351,7 +351,7 @@ static int get_proc_fd()
 	return open_detach_mount(proc_mountpoint);
 }
 
-static int parasite_get_proc_fd()
+static int parasite_get_proc_fd(void)
 {
 	int fd, ret;
 
@@ -610,7 +610,7 @@ static noinline void fini_sigreturn(unsigned long new_sp)
 	ARCH_RT_SIGRETURN(new_sp, sigframe);
 }
 
-static int fini()
+static int fini(void)
 {
 	unsigned long new_sp;
 
diff --git a/criu/sockets.c b/criu/sockets.c
index ffc4f39274b8..c81ac3272e87 100644
--- a/criu/sockets.c
+++ b/criu/sockets.c
@@ -135,7 +135,7 @@ static inline void probe_diag(int nl, struct sock_diag_req *req, int expected_er
 	do_rtnl_req(nl, req, req->hdr.nlmsg_len, probe_recv_one, probe_err, &expected_err);
 }
 
-void preload_socket_modules()
+void preload_socket_modules(void)
 {
 	int nl;
 	struct sock_diag_req req;
-- 
2.7.4



More information about the CRIU mailing list