From: Daniel Lezcano Date: Tue, 12 Oct 2010 13:11:45 +0000 (+0200) Subject: Fix compilation warning X-Git-Tag: lxc-0.7.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ca5b95ef731182ad2c409f042e44d3309bb8b69;p=thirdparty%2Flxc.git Fix compilation warning Fix some compilation warnings: * include caps.h in lxc_checkpoint and lxc_restart * check the return of the timer notification read Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c index 8567f8946..76f6709f2 100644 --- a/src/lxc/lxc_checkpoint.c +++ b/src/lxc/lxc_checkpoint.c @@ -36,6 +36,7 @@ #include "arguments.h" #include "config.h" +#include "caps.h" lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint); diff --git a/src/lxc/lxc_restart.c b/src/lxc/lxc_restart.c index 346705754..75486821c 100644 --- a/src/lxc/lxc_restart.c +++ b/src/lxc/lxc_restart.c @@ -31,6 +31,7 @@ #include "log.h" #include "lxc.h" +#include "caps.h" #include "conf.h" #include "config.h" #include "confile.h" diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c index e6249cec2..691c3ef9d 100644 --- a/src/lxc/utmp.c +++ b/src/lxc/utmp.c @@ -294,13 +294,16 @@ static int utmp_shutdown_handler(int fd, void *data, struct lxc_epoll_descr *descr) { int ntasks; + ssize_t nread; struct lxc_utmp *utmp_data = (struct lxc_utmp *)data; struct lxc_handler *handler = utmp_data->handler; struct lxc_conf *conf = handler->conf; uint64_t expirations; /* read and clear notifications */ - read(fd, &expirations, sizeof(expirations)); + nread = read(fd, &expirations, sizeof(expirations)); + if (nread < 0) + SYSERROR("Failed to read timer notification"); ntasks = utmp_get_ntasks(handler);