summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2016-08-21 11:52:21 +0100
committerFreeArtMan <dos21h@gmail.com>2016-08-21 11:52:21 +0100
commite5d54dd48e8c73d945948f35e375f331864f37dd (patch)
tree165f96e0a83db5debc4bb3b9815bea8fbfb97f77
parenta0b3f5be7c2922e9faf21b2a2ee06e0a1891c5bd (diff)
downloadlibcmd-master.tar.gz
libcmd-master.zip
Fixed warning from -WallHEADmaster
-rw-r--r--cmd.c2
-rw-r--r--cmd_parse.c4
-rw-r--r--cmd_parse.ragel4
3 files changed, 4 insertions, 6 deletions
diff --git a/cmd.c b/cmd.c
index fd7ec9e..7aa0434 100644
--- a/cmd.c
+++ b/cmd.c
@@ -190,7 +190,6 @@ err_malloc_type:
free( ret->argv );
err_malloc_argv:
free( ret );
-err_exit:
return NULL;
}
@@ -539,7 +538,6 @@ char* cmd_mng_autocomplete( cmd_mng_t *cmng, char *cmd, size_t cmd_sz )
int ac_sz=0,cnt_sz=0;
char *ac_str;
memset( &tl, 0, sizeof( cmd_tok_t ));
- int i;
if ( parse_cmd(ptr, cmd, cmd_sz) == -1)
{
diff --git a/cmd_parse.c b/cmd_parse.c
index 96438c7..fc65bf6 100644
--- a/cmd_parse.c
+++ b/cmd_parse.c
@@ -127,7 +127,7 @@ int parse_cmd( cmd_tok_t *tl, const char *str, size_t str_size )
char *ts, *te = 0;
/*save for cmd_begin state*/
- char *ts_cb=0, *te_cb=0;
+ //char *ts_cb=0, *te_cb=0;
printf("PE:%s %02x\n",pe,(unsigned char)*pe);
@@ -324,7 +324,7 @@ _again:
if ( cs == cmd_error )
{
- printf("CLIPARSE ERR state [%d] pos[%d]:[%s]\n", res, p-str, p);
+ printf("CLIPARSE ERR state [%d] pos[%ld]:[%s]\n", res, p-str, p);
res = -1;
}
diff --git a/cmd_parse.ragel b/cmd_parse.ragel
index 2fa030c..30a4676 100644
--- a/cmd_parse.ragel
+++ b/cmd_parse.ragel
@@ -73,7 +73,7 @@ int parse_cmd( cmd_tok_t *tl, const char *str, size_t str_size )
char *ts, *te = 0;
/*save for cmd_begin state*/
- char *ts_cb=0, *te_cb=0;
+ //char *ts_cb=0, *te_cb=0;
printf("PE:%s %02x\n",pe,(unsigned char)*pe);
@@ -86,7 +86,7 @@ int parse_cmd( cmd_tok_t *tl, const char *str, size_t str_size )
if ( cs == cmd_error )
{
- printf("CLIPARSE ERR state [%d] pos[%d]:[%s]\n", res, p-str, p);
+ printf("CLIPARSE ERR state [%d] pos[%ld]:[%s]\n", res, p-str, p);
res = -1;
}