Avoid some warnings

This commit is contained in:
Pierre Pronchery 2015-12-29 01:00:11 +01:00
parent edb9fbd1c5
commit c8ad5f30fd

View File

@ -177,8 +177,8 @@ static void _hayes_log(Hayes * hayes, HayesChannel * channel,
/* parser */ /* parser */
static int _hayes_parse(Hayes * hayes, HayesChannel * channel); static int _hayes_parse(Hayes * hayes, HayesChannel * channel);
static int _hayes_parse_trigger(Hayes * hayes, HayesChannel * channel, static int _hayes_parse_trigger(HayesChannel * channel, char const * answer,
char const * answer, HayesCommand * command); HayesCommand * command);
/* queue */ /* queue */
static int _hayes_queue_command(Hayes * hayes, HayesChannel * channel, static int _hayes_queue_command(Hayes * hayes, HayesChannel * channel,
@ -1054,8 +1054,8 @@ static int _parse_do(Hayes * hayes, HayesChannel * channel)
if(command == NULL || hayes_command_get_status(command) != HCS_ACTIVE) if(command == NULL || hayes_command_get_status(command) != HCS_ACTIVE)
/* this was most likely unsollicited */ /* this was most likely unsollicited */
return _hayes_parse_trigger(hayes, channel, line, NULL); return _hayes_parse_trigger(channel, line, NULL);
_hayes_parse_trigger(hayes, channel, line, command); _hayes_parse_trigger(channel, line, command);
if(hayes_command_answer_append(command, line) != 0) if(hayes_command_answer_append(command, line) != 0)
return -1; return -1;
if((status = hayes_command_get_status(command)) == HCS_ACTIVE) if((status = hayes_command_get_status(command)) == HCS_ACTIVE)
@ -1071,8 +1071,8 @@ static int _parse_do(Hayes * hayes, HayesChannel * channel)
/* hayes_parse_trigger */ /* hayes_parse_trigger */
static int _hayes_parse_trigger(Hayes * hayes, HayesChannel * channel, static int _hayes_parse_trigger(HayesChannel * channel, char const * answer,
char const * answer, HayesCommand * command) HayesCommand * command)
{ {
size_t i; size_t i;
const size_t count = sizeof(_hayes_code_handlers) const size_t count = sizeof(_hayes_code_handlers)
@ -1083,8 +1083,7 @@ static int _hayes_parse_trigger(Hayes * hayes, HayesChannel * channel,
int j; int j;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "DEBUG: %s(hayes, \"%s\", command)\n", __func__, fprintf(stderr, "DEBUG: %s(\"%s\", command)\n", __func__, answer);
answer);
#endif #endif
/* if the handler is obvious return directly */ /* if the handler is obvious return directly */
for(i = 0; i < count; i++) for(i = 0; i < count; i++)