summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2010-12-27 18:38:46 +0300
committerKozlov Dmitry <dima@server>2010-12-27 18:38:46 +0300
commit73b6989bdc0066caa4d8c351127345d7785feb92 (patch)
tree657627aea5e11304be5de0e29c6582101afb521c
parent330c5a3c8a531d79a2f87953806ef47f61262e14 (diff)
downloadaccel-ppp-73b6989bdc0066caa4d8c351127345d7785feb92.tar.gz
accel-ppp-73b6989bdc0066caa4d8c351127345d7785feb92.zip
fix compilation warnings
-rw-r--r--accel-pptpd/CMakeLists.txt2
-rw-r--r--accel-pptpd/cli/std_cmd.c4
-rw-r--r--accel-pptpd/ctrl/l2tp/dict.c2
-rw-r--r--accel-pptpd/logs/log_file.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/accel-pptpd/CMakeLists.txt b/accel-pptpd/CMakeLists.txt
index 618cf0d9..8ed03b8d 100644
--- a/accel-pptpd/CMakeLists.txt
+++ b/accel-pptpd/CMakeLists.txt
@@ -11,7 +11,7 @@ IF (NOT HAVE_SSL)
MESSAGE(FATAL_ERROR "openssl headers not found")
ENDIF (NOT HAVE_SSL)
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fvisibility=hidden -D_GNU_SOURCE -DPTHREAD_SPINLOCK -DMEMDEBUG -fPIC")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fvisibility=hidden -fno-strict-aliasing -D_GNU_SOURCE -DPTHREAD_SPINLOCK -DMEMDEBUG -fPIC")
IF (EXISTS ${CMAKE_HOME_DIRECTORY}/.git)
EXECUTE_PROCESS(
diff --git a/accel-pptpd/cli/std_cmd.c b/accel-pptpd/cli/std_cmd.c
index 50f34593..fb830dc3 100644
--- a/accel-pptpd/cli/std_cmd.c
+++ b/accel-pptpd/cli/std_cmd.c
@@ -100,7 +100,7 @@ static int show_ses_exec(const char *cmd, char * const *fields, int fields_cnt,
int order = ORDER_NONE;
int match = MATCH_NONE;
struct row_t *row, *row2, *row3;
- pcre *re;
+ pcre *re = NULL;
const char *pcre_err;
int pcre_offset;
LIST_HEAD(rows);
@@ -302,7 +302,7 @@ static int terminate_exec2(int key, char * const *f, int f_cnt, void *cli)
{
struct ppp_t *ppp;
int hard = 0;
- in_addr_t ipaddr;
+ in_addr_t ipaddr = 0;
if (f_cnt == 4) {
if (!strcmp(f[3], "hard"))
diff --git a/accel-pptpd/ctrl/l2tp/dict.c b/accel-pptpd/ctrl/l2tp/dict.c
index a0ca9999..c93ccd48 100644
--- a/accel-pptpd/ctrl/l2tp/dict.c
+++ b/accel-pptpd/ctrl/l2tp/dict.c
@@ -117,7 +117,7 @@ static int dict_load(const char *fname)
struct l2tp_dict_attr_t *attr;
struct l2tp_dict_value_t *value;
struct list_head *items;
- int r, n, i;
+ int i, r, n = 0;
f = fopen(fname, "r");
if (!f) {
diff --git a/accel-pptpd/logs/log_file.c b/accel-pptpd/logs/log_file.c
index 08a60537..e4357573 100644
--- a/accel-pptpd/logs/log_file.c
+++ b/accel-pptpd/logs/log_file.c
@@ -6,6 +6,8 @@
#include <unistd.h>
#include <limits.h>
#include <aio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include "log.h"
#include "events.h"