tree-wide: fix compilation with-Wstrict-prototypes -Wold-style-definition

Fixes: #3630 Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 132024c5
...@@ -82,7 +82,7 @@ static int lxc_log_priority_to_syslog(int priority) ...@@ -82,7 +82,7 @@ static int lxc_log_priority_to_syslog(int priority)
return LOG_NOTICE; return LOG_NOTICE;
} }
static const char *lxc_log_get_container_name() static const char *lxc_log_get_container_name(void)
{ {
#ifndef NO_LXC_CONF #ifndef NO_LXC_CONF
if (current_config && !log_vmname) if (current_config && !log_vmname)
...@@ -814,7 +814,7 @@ inline const char *lxc_log_get_prefix(void) ...@@ -814,7 +814,7 @@ inline const char *lxc_log_get_prefix(void)
return log_prefix; return log_prefix;
} }
inline void lxc_log_options_no_override() inline void lxc_log_options_no_override(void)
{ {
lxc_quiet_specified = 1; lxc_quiet_specified = 1;
lxc_loglevel_specified = 1; lxc_loglevel_specified = 1;
......
...@@ -588,7 +588,7 @@ static bool file_is_yes(const char *path) ...@@ -588,7 +588,7 @@ static bool file_is_yes(const char *path)
return rd >= 4 && strncmp(buf, "yes\n", 4) == 0; return rd >= 4 && strncmp(buf, "yes\n", 4) == 0;
} }
static bool apparmor_can_stack() static bool apparmor_can_stack(void)
{ {
int major, minor, scanned; int major, minor, scanned;
FILE *f; FILE *f;
......
...@@ -116,7 +116,7 @@ __noreturn static void print_usage_exit(const struct option longopts[], ...@@ -116,7 +116,7 @@ __noreturn static void print_usage_exit(const struct option longopts[],
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
__noreturn static void print_version_exit() __noreturn static void print_version_exit(void)
{ {
printf("%s\n", lxc_get_version()); printf("%s\n", lxc_get_version());
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
......
...@@ -509,7 +509,7 @@ static int do_clone_task(struct lxc_container *c, enum task task, int flags, ...@@ -509,7 +509,7 @@ static int do_clone_task(struct lxc_container *c, enum task task, int flags,
return ret; return ret;
} }
static void free_mnts() static void free_mnts(void)
{ {
unsigned int i; unsigned int i;
struct mnts *n = NULL; struct mnts *n = NULL;
......
...@@ -238,7 +238,7 @@ int mkdir_p(const char *dir, mode_t mode) ...@@ -238,7 +238,7 @@ int mkdir_p(const char *dir, mode_t mode)
return 0; return 0;
} }
char *get_rundir() char *get_rundir(void)
{ {
__do_free char *rundir = NULL; __do_free char *rundir = NULL;
char *static_rundir; char *static_rundir;
......
...@@ -173,7 +173,7 @@ out1: ...@@ -173,7 +173,7 @@ out1:
return ret; return ret;
} }
int main() int main(int argc, char *argv[])
{ {
int ret = EXIT_FAILURE; int ret = EXIT_FAILURE;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
fprintf(stderr, "%d: %s\n", __LINE__, x); \ fprintf(stderr, "%d: %s\n", __LINE__, x); \
} while (0) } while (0)
int main() int main(int argc, char *argv[])
{ {
struct lxc_container *c; struct lxc_container *c;
const char *p1, *p2; const char *p1, *p2;
......
...@@ -371,13 +371,13 @@ out: ...@@ -371,13 +371,13 @@ out:
return ret; return ret;
} }
static int do_priv_container_test() static int do_priv_container_test(void)
{ {
const char *config_items[] = {"lxc.mount.auto", "shmounts:/tmp/mount_injection_test", NULL}; const char *config_items[] = {"lxc.mount.auto", "shmounts:/tmp/mount_injection_test", NULL};
return perform_container_test(NAME"privileged", config_items); return perform_container_test(NAME"privileged", config_items);
} }
static int do_unpriv_container_test() static int do_unpriv_container_test(void)
{ {
const char *config_items[] = { const char *config_items[] = {
"lxc.mount.auto", "shmounts:/tmp/mount_injection_test", "lxc.mount.auto", "shmounts:/tmp/mount_injection_test",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment