]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix findings 0-3, 5, and 8 for Coverity MISSING_BREAK errors.
authorMark Michelson <mmichelson@digium.com>
Mon, 7 May 2012 16:01:28 +0000 (16:01 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 7 May 2012 16:01:28 +0000 (16:01 +0000)
(Issue ASTERISK-19662)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@365460 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_analog.c
main/abstract_jb.c
main/audiohook.c
res/res_agi.c
res/res_speech.c

index cbc09cd512e8ec5519b9a524a02a8075f3174dee..93e117656bb3fe3fc337c7cfccb1ec8eeb472085 100644 (file)
@@ -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:
index 4cd5ccb0d7acaf732d5f98c8361f8b953d6ca168..fa45b880c593abec6fc4edf629f346934606bf43 100644 (file)
@@ -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);
index 7509321162bc8c0c79e09321c600716175beb86e..ef717aaf20d32f8e3e8b08e3b605ddf4428ea7ca 100644 (file)
@@ -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;
index 4cddfab82102b9520deee8cec93c1e160353d86f..a6f879152028672945594054127f0f3da5f44035 100644 (file)
@@ -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;
        }
index 269e99c26e3982a52f638313db13f73023e00b62..9b043190be1268eb2d32110ccfba8eabc6a7b020 100644 (file)
@@ -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;
 }