Fixed a few minor compiler warnings on FreeBSD
This commit fixes a few warnings about possible uninitialized and unused variables.
This commit is contained in:
parent
4248b26870
commit
6eeb413094
@ -156,7 +156,7 @@ case "$host" in
|
|||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
;;
|
;;
|
||||||
*-*-freebsd*)
|
*-*-freebsd*)
|
||||||
# disable read-only locations and immediate binding protection on FreeBSD
|
# disable read-only relocations and immediate binding protection on FreeBSD
|
||||||
# due the following errors (there is probably a solution to this in another
|
# due the following errors (there is probably a solution to this in another
|
||||||
# way, please email Michael Rash mbr.at.cipherdyne.org
|
# way, please email Michael Rash mbr.at.cipherdyne.org
|
||||||
# gcc: -z: linker input file unused because linking not done
|
# gcc: -z: linker input file unused because linking not done
|
||||||
|
|||||||
@ -46,7 +46,7 @@ static char cmd_out[STANDARD_CMD_OUT_BUFSIZE];
|
|||||||
unsigned short
|
unsigned short
|
||||||
get_next_rule_num(void)
|
get_next_rule_num(void)
|
||||||
{
|
{
|
||||||
unsigned short i, next_rule;
|
unsigned short i;
|
||||||
|
|
||||||
for(i=0; i < fwc.max_rules; i++)
|
for(i=0; i < fwc.max_rules; i++)
|
||||||
{
|
{
|
||||||
@ -335,8 +335,6 @@ fw_cleanup(void)
|
|||||||
int
|
int
|
||||||
process_spa_request(fko_srv_options_t *opts, spa_data_t *spadat)
|
process_spa_request(fko_srv_options_t *opts, spa_data_t *spadat)
|
||||||
{
|
{
|
||||||
char *ndx;
|
|
||||||
|
|
||||||
unsigned short rule_num;
|
unsigned short rule_num;
|
||||||
|
|
||||||
acc_port_list_t *port_list = NULL;
|
acc_port_list_t *port_list = NULL;
|
||||||
@ -463,7 +461,7 @@ check_firewall_rules(fko_srv_options_t *opts)
|
|||||||
char rule_num_str[6];
|
char rule_num_str[6];
|
||||||
char *ndx, *rn_start, *rn_end, *tmp_mark;
|
char *ndx, *rn_start, *rn_end, *tmp_mark;
|
||||||
|
|
||||||
int i, res;
|
int i=0, res=0;
|
||||||
time_t now, rule_exp, min_exp = 0;
|
time_t now, rule_exp, min_exp = 0;
|
||||||
unsigned short curr_rule;
|
unsigned short curr_rule;
|
||||||
|
|
||||||
@ -630,9 +628,7 @@ check_firewall_rules(fko_srv_options_t *opts)
|
|||||||
void
|
void
|
||||||
ipfw_purge_expired_rules(fko_srv_options_t *opts)
|
ipfw_purge_expired_rules(fko_srv_options_t *opts)
|
||||||
{
|
{
|
||||||
char exp_str[12];
|
char *ndx, *co_end;
|
||||||
char rule_num_str[6];
|
|
||||||
char *ndx, *next_nl, *co_end;
|
|
||||||
|
|
||||||
int i, res;
|
int i, res;
|
||||||
|
|
||||||
|
|||||||
@ -382,7 +382,7 @@ static void
|
|||||||
check_dir_path(const char *filepath, const char *fp_desc, unsigned char use_basename)
|
check_dir_path(const char *filepath, const char *fp_desc, unsigned char use_basename)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int res;
|
int res = 0;
|
||||||
char tmp_path[MAX_PATH_LEN];
|
char tmp_path[MAX_PATH_LEN];
|
||||||
char *ndx;
|
char *ndx;
|
||||||
|
|
||||||
@ -467,7 +467,7 @@ static int
|
|||||||
make_dir_path(const char *run_dir)
|
make_dir_path(const char *run_dir)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int res, len;
|
int res = 0, len = 0;
|
||||||
char tmp_path[MAX_PATH_LEN];
|
char tmp_path[MAX_PATH_LEN];
|
||||||
char *ndx;
|
char *ndx;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user