From 7e0672b3869b9ac31717417ff0e9e3ce0d5687d9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 25 Sep 2012 11:21:34 +0000 Subject: fixed -Wall --- src/anylike.c | 3 ++- src/configure | 2 +- src/daemon.h | 1 + src/log.c | 2 +- src/sig_handler.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/anylike.c b/src/anylike.c index 88edee3..bc3bc7a 100644 --- a/src/anylike.c +++ b/src/anylike.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -91,7 +92,7 @@ void cleanup_crypt() #endif } -extern const uint8_t anylike_lua_bytecode[]; +extern const char anylike_lua_bytecode[]; extern const uint32_t anylike_lua_bytecode_len; #define LUA_MAIN_LOOP_FUNC "main_loop" diff --git a/src/configure b/src/configure index 28b97c7..680d22e 100755 --- a/src/configure +++ b/src/configure @@ -32,7 +32,7 @@ TARGET=`uname -s` EBUILD_COMPAT=0 -CFLAGS='-g -O2' +CFLAGS='-g -Wall -O2' LDFLAGS='-g -Wall -O2 -lm' CRYPTO_LIB='gnutls' diff --git a/src/daemon.h b/src/daemon.h index 0c57a8c..5acc312 100644 --- a/src/daemon.h +++ b/src/daemon.h @@ -122,6 +122,7 @@ int do_chroot(const char* chrootdir) log_printf(ERROR, "can't change to /: %s", strerror(errno)); return -1; } + return 0; } void daemonize() diff --git a/src/log.c b/src/log.c index c52c5dc..c21e7c2 100644 --- a/src/log.c +++ b/src/log.c @@ -249,7 +249,7 @@ void log_print_hex_dump(log_prio_t prio, const uint8_t* buf, uint32_t len) int offset = snprintf(msg, MSG_LENGTH_MAX, "dump(%d): ", len); if(offset < 0) return; - uint8_t* ptr = &msg[offset]; + char* ptr = &msg[offset]; for(i=0; i < len; i++) { if(((i+1)*3) >= (MSG_LENGTH_MAX - offset)) diff --git a/src/sig_handler.c b/src/sig_handler.c index 1f7f3a1..1dec973 100644 --- a/src/sig_handler.c +++ b/src/sig_handler.c @@ -39,7 +39,7 @@ #include "sig_handler.h" #include - +#include #ifndef WINVER -- cgit v1.2.3