/**********************/
void
-cmdline_valid_buffer(struct rdline *rdl, const char *buf, unsigned int size)
+cmdline_valid_buffer(struct rdline *rdl, const char *buf,
+ __attribute__((unused)) unsigned int size)
{
struct cmdline *cl = rdl->opaque;
int ret;
int l;
unsigned int nb_completable;
unsigned int nb_non_completable;
- unsigned int local_state=0;
+ int local_state = 0;
char *help_str;
cmdline_parse_ctx_t *ctx = cl->ctx;
debug_printf("%s called\n", __FUNCTION__);
+ memset(&token_hdr, 0, sizeof(token_hdr));
+
/* count the number of complete token to parse */
for (i=0 ; buf[i] ; i++) {
if (!isblank2(buf[i]) && isblank2(buf[i+1]))
/* one or several choices starting with the
same chars */
if (completion_len > 0) {
- if (completion_len + 1 > size)
+ if ((unsigned)(completion_len + 1) > size)
return 0;
strcpy(dst, completion_buf);
#define ETHER_ADDRSTRLEN 18
int
-cmdline_parse_etheraddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res)
+cmdline_parse_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+ const char *buf, void *res)
{
unsigned int token_len = 0;
char ether_str[ETHER_ADDRSTRLEN];
return token_len;
}
-int cmdline_get_help_etheraddr(cmdline_parse_token_hdr_t *tk, char *dstbuf,
- unsigned int size)
+int cmdline_get_help_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+ char *dstbuf, unsigned int size)
{
snprintf(dstbuf, size, "Ethernet address");
return 0;
char tmp_buf[BUFSIZ];
int complete_state;
int ret;
- int tmp_size;
+ unsigned int tmp_size;
if (cmd == CMDLINE_KEY_TAB)
complete_state = 0;