Fixing warnings reported by -Wall (#258)

* Fixing warnings reported by -Wall
* Adding macros to detect whether EPOLL related macros are defined
This commit is contained in:
Li Lei
2018-11-04 10:45:46 -08:00
committed by Chia-Che Tsai
parent f07dfd052f
commit 627f2dafb8
2 changed files with 9 additions and 2 deletions
+4 -2
View File
@@ -31,8 +31,6 @@
#include <errno.h>
#warning "be sure before including this file"
#if !defined(NS) || !defined(NS_CAP)
# error "NS or NS_CAP is not defined"
#endif
@@ -844,6 +842,9 @@ static int connect_ns (IDTYPE * vmid, struct shim_ipc_port ** portptr)
return 0;
}
// Turn off this function as it is not used
// Keep the code for future use
#if 0
static int disconnect_ns(struct shim_ipc_port * port)
{
lock(cur_process.lock);
@@ -855,6 +856,7 @@ static int disconnect_ns(struct shim_ipc_port * port)
del_ipc_port(port, IPC_PORT_LDR);
return 0;
}
#endif
int CONCAT3(prepare, NS, leader) (void)
{
+5
View File
@@ -38,6 +38,9 @@
#include <linux/eventpoll.h>
/* Avoid duplicated definitions */
#ifndef EPOLLIN
#define EPOLLIN 0x001
#define EPOLLPRI 0x002
#define EPOLLOUT 0x004
@@ -49,6 +52,8 @@
#define EPOLLHUP 0x010
#define EPOLLRDHUP 0x2000
#endif
#define MAX_EPOLL_FDS 1024
struct shim_mount epoll_builtin_fs;