summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anylike.org>2012-09-25 11:21:34 (GMT)
committerChristian Pointner <equinox@anylike.org>2012-09-25 11:21:34 (GMT)
commit7e0672b3869b9ac31717417ff0e9e3ce0d5687d9 (patch)
treeaeaf7e393d0bded051dd79e7fbd64b6583232abf
parent892f2c939c2ea860f9b6fab11b5b23b31eb90081 (diff)
fixed -Wall
-rw-r--r--src/anylike.c3
-rwxr-xr-xsrc/configure2
-rw-r--r--src/daemon.h1
-rw-r--r--src/log.c2
-rw-r--r--src/sig_handler.c2
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 <stdlib.h>
#include <stdio.h>
#include <errno.h>
+#include <string.h>
#include <lua.h>
#include <lualib.h>
@@ -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 <errno.h>
-
+#include <string.h>
#ifndef WINVER