提交 73b6989b 编写于 作者: K Kozlov Dmitry

fix compilation warnings

上级 330c5a3c
......@@ -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(
......
......@@ -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"))
......
......@@ -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) {
......
......@@ -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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册