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:
Michael Rash 2011-08-20 13:33:00 -04:00
parent 4248b26870
commit 6eeb413094
3 changed files with 6 additions and 10 deletions

View File

@ -156,7 +156,7 @@ case "$host" in
*-*-linux*)
;;
*-*-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
# way, please email Michael Rash mbr.at.cipherdyne.org
# gcc: -z: linker input file unused because linking not done

View File

@ -46,7 +46,7 @@ static char cmd_out[STANDARD_CMD_OUT_BUFSIZE];
unsigned short
get_next_rule_num(void)
{
unsigned short i, next_rule;
unsigned short i;
for(i=0; i < fwc.max_rules; i++)
{
@ -335,8 +335,6 @@ fw_cleanup(void)
int
process_spa_request(fko_srv_options_t *opts, spa_data_t *spadat)
{
char *ndx;
unsigned short rule_num;
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 *ndx, *rn_start, *rn_end, *tmp_mark;
int i, res;
int i=0, res=0;
time_t now, rule_exp, min_exp = 0;
unsigned short curr_rule;
@ -630,9 +628,7 @@ check_firewall_rules(fko_srv_options_t *opts)
void
ipfw_purge_expired_rules(fko_srv_options_t *opts)
{
char exp_str[12];
char rule_num_str[6];
char *ndx, *next_nl, *co_end;
char *ndx, *co_end;
int i, res;

View File

@ -382,7 +382,7 @@ static void
check_dir_path(const char *filepath, const char *fp_desc, unsigned char use_basename)
{
struct stat st;
int res;
int res = 0;
char tmp_path[MAX_PATH_LEN];
char *ndx;
@ -467,7 +467,7 @@ static int
make_dir_path(const char *run_dir)
{
struct stat st;
int res, len;
int res = 0, len = 0;
char tmp_path[MAX_PATH_LEN];
char *ndx;