From: Stéphane Graber Date: Thu, 24 Oct 2013 01:42:42 +0000 (-0400) Subject: clang: Fix some simple issues X-Git-Tag: lxc-1.0.0.alpha3~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f47bc3f318b84886e86fe3e71e37c9a9d3b79d8;p=thirdparty%2Flxc.git clang: Fix some simple issues Signed-off-by: Stéphane Graber --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 106ed4fce..680d26080 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -901,7 +901,7 @@ static int config_hook(const char *key, const char *value, return -1; } -static int config_personality(const char *key, const const char *value, +static int config_personality(const char *key, const char *value, struct lxc_conf *lxc_conf) { signed long personality = lxc_config_parse_arch(value); diff --git a/src/lxc/lxc_monitord.c b/src/lxc/lxc_monitord.c index 404934588..fdc80c5fd 100644 --- a/src/lxc/lxc_monitord.c +++ b/src/lxc/lxc_monitord.c @@ -47,8 +47,6 @@ lxc_log_define(lxc_monitord, lxc); -static struct lxc_monitor mon; - static void lxc_monitord_cleanup(void); /* @@ -71,6 +69,8 @@ struct lxc_monitor { struct lxc_epoll_descr descr; }; +static struct lxc_monitor mon; + static int lxc_monitord_fifo_create(struct lxc_monitor *mon) { char fifo_path[PATH_MAX]; @@ -379,7 +379,8 @@ int main(int argc, char *argv[]) * if-empty-statement construct is to quiet the * warn-unused-result warning. */ - if (write(pipefd, "S", 1)) ; + if (write(pipefd, "S", 1)) + ; close(pipefd); if (lxc_monitord_mainloop_add(&mon)) { diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index e736937c4..ab567c81b 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -328,7 +328,8 @@ int lxc_monitord_spawn(const char *lxcpath) * synced with the child process. the if-empty-statement * construct is to quiet the warn-unused-result warning. */ - if (read(pipefd[0], &c, 1)) ; + if (read(pipefd[0], &c, 1)) + ; close(pipefd[0]); exit(EXIT_SUCCESS); } diff --git a/src/lxc/version.c b/src/lxc/version.c index c47d5520e..bfa34bdb0 100644 --- a/src/lxc/version.c +++ b/src/lxc/version.c @@ -23,7 +23,7 @@ #include "../config.h" -const char const* lxc_version(void) +const char *lxc_version(void) { return PACKAGE_VERSION; } diff --git a/src/lxc/version.h b/src/lxc/version.h index a88ffad42..e2b0fc4c2 100644 --- a/src/lxc/version.h +++ b/src/lxc/version.h @@ -26,6 +26,6 @@ /* * Returns the version number of the library */ -extern const char const *lxc_version(void); +extern const char *lxc_version(void); #endif