From: Mark Michelson Date: Mon, 7 May 2012 16:01:28 +0000 (+0000) Subject: Fix findings 0-3, 5, and 8 for Coverity MISSING_BREAK errors. X-Git-Tag: 1.8.14.0-rc1~3^2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eafb43056282985eb9c7261caae69698f90127c8;p=thirdparty%2Fasterisk.git Fix findings 0-3, 5, and 8 for Coverity MISSING_BREAK errors. (Issue ASTERISK-19662) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365460 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/sig_analog.c b/channels/sig_analog.c index cbc09cd512..93e117656b 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -2787,6 +2787,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_ case ANALOG_EVENT_ALARM: analog_set_alarm(p, 1); analog_get_and_handle_alarms(p); + /* Intentionally fall through to analog_set_echocanceller() call */ case ANALOG_EVENT_ONHOOK: switch (p->sig) { case ANALOG_SIG_FXOLS: diff --git a/main/abstract_jb.c b/main/abstract_jb.c index 4cd5ccb0d7..fa45b880c5 100644 --- a/main/abstract_jb.c +++ b/main/abstract_jb.c @@ -406,6 +406,7 @@ static void jb_get_and_deliver(struct ast_channel *chan) case JB_IMPL_OK: /* deliver the frame */ ast_write(chan, f); + /* Fall through intentionally */ case JB_IMPL_DROP: jb_framelog("\tJB_GET {now=%ld}: %s frame with ts=%ld and len=%ld\n", now, jb_get_actions[res], f->ts, f->len); diff --git a/main/audiohook.c b/main/audiohook.c index 7509321162..ef717aaf20 100644 --- a/main/audiohook.c +++ b/main/audiohook.c @@ -71,6 +71,7 @@ int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type switch (type) { case AST_AUDIOHOOK_TYPE_SPY: ast_slinfactory_init(&audiohook->read_factory); + /* Fall through intentionally */ case AST_AUDIOHOOK_TYPE_WHISPER: ast_slinfactory_init(&audiohook->write_factory); break; @@ -94,6 +95,7 @@ int ast_audiohook_destroy(struct ast_audiohook *audiohook) switch (audiohook->type) { case AST_AUDIOHOOK_TYPE_SPY: ast_slinfactory_destroy(&audiohook->read_factory); + /* Fall through intentionally */ case AST_AUDIOHOOK_TYPE_WHISPER: ast_slinfactory_destroy(&audiohook->write_factory); break; diff --git a/res/res_agi.c b/res/res_agi.c index 4cddfab821..a6f8791520 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -3619,6 +3619,7 @@ static char *handle_cli_agi_show(struct ast_cli_entry *e, int cmd, struct ast_cl " When called with a topic as an argument, displays usage\n" " information on the given command. If called without a\n" " topic, it provides a list of AGI commands.\n"; + return NULL; case CLI_GENERATE: return NULL; } diff --git a/res/res_speech.c b/res/res_speech.c index 269e99c26e..9b043190be 100644 --- a/res/res_speech.c +++ b/res/res_speech.c @@ -250,15 +250,13 @@ int ast_speech_change_state(struct ast_speech *speech, int state) { int res = 0; - switch (state) { - case AST_SPEECH_STATE_WAIT: + if (state == AST_SPEECH_STATE_WAIT) { /* The engine heard audio, so they spoke */ ast_set_flag(speech, AST_SPEECH_SPOKE); - default: - speech->state = state; - break; } + speech->state = state; + return res; }