cleared IDE warnings

This commit is contained in:
Sylvain Rochet 2012-06-04 00:59:24 +02:00
parent 093c7b4386
commit bea45b3c30
7 changed files with 23 additions and 88 deletions

View File

@ -1174,6 +1174,7 @@ auth_withpeer_success(unit, protocol, prot_flavor)
default:
warn("auth_withpeer_success: unknown protocol %x", protocol);
bit = 0;
/* no break */
}
notice("%s authentication succeeded", prot);

View File

@ -117,6 +117,7 @@ fsm_lowerup(f)
default:
FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state));
/* no break */
}
}
@ -162,6 +163,7 @@ fsm_lowerdown(f)
default:
FSMDEBUG(("%s: Down event in state %d!", PROTO_NAME(f), f->state));
/* no break */
}
}
@ -193,6 +195,7 @@ fsm_open(f)
case CLOSING:
f->state = STOPPING;
/* fall through */
/* no break */
case STOPPED:
case OPENED:
if( f->flags & OPT_RESTART ){
@ -325,6 +328,7 @@ fsm_timeout(arg)
default:
FSMDEBUG(("%s: Timeout event in state %d!", PROTO_NAME(f), f->state));
/* no break */
}
}
@ -711,6 +715,7 @@ fsm_protreject(f)
case CLOSING:
UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
/* fall through */
/* no break */
case CLOSED:
f->state = CLOSED;
if( f->callbacks->finished )
@ -723,6 +728,7 @@ fsm_protreject(f)
case ACKSENT:
UNTIMEOUT(fsm_timeout, f); /* Cancel timeout */
/* fall through */
/* no break */
case STOPPED:
f->state = STOPPED;
if( f->callbacks->finished )
@ -736,6 +742,7 @@ fsm_protreject(f)
default:
FSMDEBUG(("%s: Protocol-reject event in state %d!",
PROTO_NAME(f), f->state));
/* no break */
}
}

View File

@ -467,7 +467,7 @@ lcp_close(unit, reason)
oldstate = f->state;
fsm_close(f, reason);
if (oldstate == STOPPED && f->flags & (OPT_PASSIVE|OPT_SILENT|DELAYED_UP)) {
if (oldstate == STOPPED && (f->flags & (OPT_PASSIVE|OPT_SILENT|DELAYED_UP))) {
/*
* This action is not strictly according to the FSM in RFC1548,
* but it does mean that the program terminates if you do a

View File

@ -1089,13 +1089,7 @@ option_error (char *fmt, ...)
va_list args;
char buf[1024];
#if defined(__STDC__)
va_start(args, fmt);
#else
char *fmt;
va_start(args);
fmt = va_arg(args, char *);
#endif
vslprintf(buf, sizeof(buf), fmt, args);
va_end(args);
if (phase == PHASE_INITIALIZE)

View File

@ -1712,18 +1712,22 @@ pppos_input_proc(ppp_control_rx *pcrx, u_char *s, int l)
if (cur_char != PPP_ALLSTATIONS) {
break;
}
/* no break */
/* Fall through */
/* Fall through */
case PDSTART: /* Process start flag. */
/* Prepare for a new packet. */
pcrx->in_fcs = PPP_INITFCS;
/* no break */
/* Fall through */
/* Fall through */
case PDADDRESS: /* Process address field. */
if (cur_char == PPP_ALLSTATIONS) {
pcrx->in_state = PDCONTROL;
break;
}
/* no break */
/* Else assume compressed address and control fields so
* fall through to get the protocol... */
case PDCONTROL: /* Process control field. */
@ -1732,6 +1736,8 @@ pppos_input_proc(ppp_control_rx *pcrx, u_char *s, int l)
pcrx->in_state = PDPROTOCOL1;
break;
}
/* no break */
#if 0
else {
PPPDEBUG(LOG_WARNING,

View File

@ -135,17 +135,7 @@ slprintf (char *buf, int buflen, char *fmt, ...)
va_list args;
int n;
#if defined(__STDC__)
va_start(args, fmt);
#else
char *buf;
int buflen;
char *fmt;
va_start(args);
buf = va_arg(args, char *);
buflen = va_arg(args, int);
fmt = va_arg(args, char *);
#endif
n = vslprintf(buf, buflen, fmt, args);
va_end(args);
return n;
@ -287,9 +277,11 @@ vslprintf(buf, buflen, fmt, args)
num[1] = 0;
str = num;
break;
#if 0 /* do we always have strerror() in embedded ? */
case 'm':
str = strerror(errno);
break;
#endif /* do we always have strerror() in embedded ? */
case 'I':
ip = va_arg(args, u_int32_t);
ip = ntohl(ip);
@ -446,16 +438,7 @@ vslp_printer (void *arg, char *fmt, ...)
va_list pvar;
struct buffer_info *bi;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
void *arg;
char *fmt;
va_start(pvar);
arg = va_arg(pvar, void *);
fmt = va_arg(pvar, char *);
#endif
bi = (struct buffer_info *) arg;
n = vslprintf(bi->ptr, bi->len, fmt, pvar);
va_end(pvar);
@ -576,16 +559,7 @@ pr_log (void *arg, char *fmt, ...)
char *p, *eol;
char buf[256];
#if defined(__STDC__)
va_start(pvar, fmt);
#else
void *arg;
char *fmt;
va_start(pvar);
arg = va_arg(pvar, void *);
fmt = va_arg(pvar, char *);
#endif
n = vslprintf(buf, sizeof(buf), fmt, pvar);
va_end(pvar);
@ -627,13 +601,7 @@ pr_log (void *arg, char *fmt, ...)
* print_string - print a readable representation of a string using
* printer.
*/
void
print_string(p, len, printer, arg)
char *p;
int len;
void (*printer) (void *, char *, ...);
void *arg;
{
void print_string(char *p, int len, void (*printer) (void *, char *, ...), void arg) {
int c;
printer(arg, "\"");
@ -656,6 +624,7 @@ print_string(p, len, printer, arg)
break;
default:
printer(arg, "\\%.3o", c);
/* no break */
}
}
}
@ -706,14 +675,7 @@ fatal (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_ERR, fmt, pvar);
va_end(pvar);
@ -731,14 +693,7 @@ error (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_ERR, fmt, pvar);
va_end(pvar);
++error_count;
@ -752,14 +707,7 @@ warn (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_WARNING, fmt, pvar);
va_end(pvar);
}
@ -772,14 +720,7 @@ notice (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_NOTICE, fmt, pvar);
va_end(pvar);
}
@ -792,14 +733,7 @@ info (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_INFO, fmt, pvar);
va_end(pvar);
}
@ -812,14 +746,7 @@ dbglog (char *fmt, ...)
{
va_list pvar;
#if defined(__STDC__)
va_start(pvar, fmt);
#else
char *fmt;
va_start(pvar);
fmt = va_arg(pvar, char *);
#endif
logit(LOG_DEBUG, fmt, pvar);
va_end(pvar);
}

View File

@ -316,8 +316,8 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf *pb)
ntohs(IPH_LEN(&cs->cs_ip)) == hlen) {
break;
}
/* (fall through) */
/* no break */
/* fall through */
case SPECIAL_I:
case SPECIAL_D: