Commit 6ca5b95e by Daniel Lezcano Committed by Daniel Lezcano

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: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 2656d231
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "arguments.h" #include "arguments.h"
#include "config.h" #include "config.h"
#include "caps.h"
lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint); lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "log.h" #include "log.h"
#include "lxc.h" #include "lxc.h"
#include "caps.h"
#include "conf.h" #include "conf.h"
#include "config.h" #include "config.h"
#include "confile.h" #include "confile.h"
......
...@@ -294,13 +294,16 @@ static int utmp_shutdown_handler(int fd, void *data, ...@@ -294,13 +294,16 @@ static int utmp_shutdown_handler(int fd, void *data,
struct lxc_epoll_descr *descr) struct lxc_epoll_descr *descr)
{ {
int ntasks; int ntasks;
ssize_t nread;
struct lxc_utmp *utmp_data = (struct lxc_utmp *)data; struct lxc_utmp *utmp_data = (struct lxc_utmp *)data;
struct lxc_handler *handler = utmp_data->handler; struct lxc_handler *handler = utmp_data->handler;
struct lxc_conf *conf = handler->conf; struct lxc_conf *conf = handler->conf;
uint64_t expirations; uint64_t expirations;
/* read and clear notifications */ /* 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); ntasks = utmp_get_ntasks(handler);
......
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