]> granicus.if.org Git - neomutt/commitdiff
fallthrough
authorRichard Russon <rich@flatcap.org>
Sat, 25 Nov 2017 00:18:30 +0000 (00:18 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 26 Nov 2017 22:37:25 +0000 (22:37 +0000)
13 files changed:
browser.c
compose.c
curs_main.c
enter.c
handler.c
hdrline.c
main.c
ncrypt/smime.c
pager.c
pattern.c
query.c
recvattach.c
signal.c

index 4fb2ce980c60cd44a1b37cf911cefd55affac2b4..fc90239b6052174f4ea012f1271a458b0edc64bd 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1470,8 +1470,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi
 #endif
         else
           mutt_file_concat_path(f, LastDir, state.entry[menu->current].name, flen);
-
-      /* Fall through to OP_EXIT */
+      /* fallthrough */
 
       case OP_EXIT:
 
index ee1effc32f8f12234e528b3b6cd5ac31b3d86ecb..0d66014d002e6dcda5f0a24e9dbc6dd3af62cfa4 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1531,8 +1531,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */
         }
         else if (i == MUTT_ABORT)
           break; /* abort */
-
-      /* fall through to postpone! */
+      /* fallthrough */
 
       case OP_COMPOSE_POSTPONE_MESSAGE:
 
index ed6379ce979a022e3adae70975b13c304666b545..3bf6fd7852456f0414b4b31f2b8f8922bd81bbce 100644 (file)
@@ -1232,6 +1232,7 @@ int mutt_index_menu(void)
       case OP_GET_PARENT:
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+      /* fallthrough */
 
       case OP_GET_MESSAGE:
         CHECK_IN_MAILBOX;
@@ -3167,12 +3168,11 @@ int mutt_index_menu(void)
 #ifdef USE_NNTP
       case OP_FOLLOWUP:
       case OP_FORWARD_TO_GROUP:
-
         CHECK_MSGCOUNT;
         CHECK_VISIBLE;
+      /* fallthrough */
 
       case OP_POST:
-
         CHECK_ATTACH;
         if (op != OP_FOLLOWUP || !CURHDR->env->followup_to ||
             (mutt_str_strcasecmp(CURHDR->env->followup_to, "poster") != 0) ||
@@ -3196,7 +3196,7 @@ int mutt_index_menu(void)
           break;
         }
 #endif
-
+      /* fallthrough */
       case OP_REPLY:
 
         CHECK_ATTACH;
diff --git a/enter.c b/enter.c
index a64bd2f6a27ea732189f808e9044ef7dd888982e..3de82d1ffe937ca88108f74dbdad934ac7817f14 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -457,8 +457,10 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
             break;
           }
           else if (!(flags & MUTT_FILE))
+          {
             goto self_insert;
-        /* fall through to completion routine (MUTT_FILE) */
+          }
+        /* fallthrough */
 
         case OP_EDITOR_COMPLETE:
         case OP_EDITOR_COMPLETE_QUERY:
index b0b3e623469de62e5c947ce89eeb9bf452755b0f..73b4d5a73bd41dac34481b67be97114674c36390 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -876,7 +876,8 @@ static int text_enriched_handler(struct Body *a, struct State *s)
           tag_len = 0;
           state = TAG;
         }
-      /* Yes, fall through (it wasn't a <<, so this char is first in TAG) */
+      /* Yes, (it wasn't a <<, so this char is first in TAG) */
+      /* fallthrough */
       case TAG:
         if (wc == (wchar_t) '>')
         {
index 4920adf98922e0f9288ac8df446f77872441d02f..c0d3af34b12b70d1e1a153d71c8fad6844b40022 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -506,7 +506,7 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
           break;
         }
       }
-    /* fall through on failure */
+    /* fallthrough */
 
     case 'a':
       colorlen = add_index_color(dest, destlen, flags, MT_COLOR_INDEX_AUTHOR);
@@ -538,7 +538,8 @@ static const char *hdr_format_str(char *dest, size_t destlen, size_t col, int co
         /* break if 'K' returns nothing */
         break;
       }
-    /* fall through if 'B' returns nothing */
+    /* if 'B' returns nothing */
+    /* fallthrough */
 
     case 'b':
       if (ctx)
diff --git a/main.c b/main.c
index 5819fe4d44ea10a093357a5d73480069c08ef5d7..9d76d5834121bd9db8875fbfa5df83275b1063be 100644 (file)
--- a/main.c
+++ b/main.c
@@ -406,6 +406,7 @@ int main(int argc, char **argv, char **env)
           snprintf(buf, sizeof(buf), "set news_server=%s", optarg);
           mutt_list_insert_tail(&commands, mutt_str_strdup(buf));
         }
+        /* fallthrough */
 
         case 'G': /* List of newsgroups */
           flags |= MUTT_SELECT | MUTT_NEWS;
index e4b8f38062605737bfe39cd399f3132d7709e999..a0e17a9dcf88487e8e87aab9796cae00d50608f8 100644 (file)
@@ -2135,9 +2135,10 @@ int smime_send_menu(struct Header *msg)
               }
               break;
 
-            case 4: /* (c)lear */
+            case 4:
               FREE(&SmimeEncryptWith);
-            /* fallback */
+            /* (c)lear */
+            /* fallthrough */
             case -1: /* Ctrl-G or Enter */
               choice = 0;
               break;
diff --git a/pager.c b/pager.c
index 943132ff79fcc323b62faf2e0380128d7190d718..230af5e0cf41db37aa58c626a5e713dcab972b9a 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2451,7 +2451,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
 
           break;
         }
-      /* no previous search pattern, so fall through to search */
+      /* no previous search pattern */
+      /* fallthrough */
 
       case OP_SEARCH:
       case OP_SEARCH_REVERSE:
@@ -2947,7 +2948,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
           break;
         }
 #endif
-
+      /* fallthrough */
       case OP_REPLY:
         CHECK_MODE(IsHeader(extra) || IsMsgAttach(extra));
         CHECK_ATTACH;
index 8c4f94e2c8fea5654e5cf7c01ecb1bfaa4aa640e..185b2401636dd8fe7c71633eaa08936853926cbc 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1994,6 +1994,7 @@ int mutt_pattern_func(int op, char *prompt)
         {
           case MUTT_UNDELETE:
             mutt_set_flag(Context, Context->hdrs[Context->v2r[i]], MUTT_PURGE, 0);
+          /* fallthrough */
           case MUTT_DELETE:
             mutt_set_flag(Context, Context->hdrs[Context->v2r[i]], MUTT_DELETE,
                           (op == MUTT_DELETE));
diff --git a/query.c b/query.c
index 3696cc72f735a06fe4b9e8c92a550a99d96a0cfa..988872ec2e97aeb7871ebbc5c88a9ab88e9a58cd 100644 (file)
--- a/query.c
+++ b/query.c
@@ -429,8 +429,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, int retb
             done = 2;
             break;
           }
-        /* fall through to OP_MAIL */
-
+        /* fallthrough */
         case OP_MAIL:
           msg = mutt_new_header();
           msg->env = mutt_new_envelope();
index da28008bbeb6a1b94b8862530c51761cc027c9c6..f6c0c0386f4a7cb4cfdd12e1c74481f06664dadb 100644 (file)
@@ -232,8 +232,10 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
       else if (aptr->content->description ||
                (mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
                 MessageFormat && aptr->content->hdr))
+      {
         break;
-    /* FALLS THROUGH TO 'F' */
+      }
+    /* fallthrough */
     case 'F':
       if (!optional)
       {
@@ -248,7 +250,7 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols,
         optional = 0;
         break;
       }
-    /* FALLS THROUGH TO 'f' */
+    /* fallthrough */
     case 'f':
       if (!optional)
       {
@@ -1359,8 +1361,8 @@ void mutt_view_attachments(struct Header *hdr)
         if (!CURATTACH->content->hdr->env->followup_to ||
             (mutt_str_strcasecmp(CURATTACH->content->hdr->env->followup_to,
                                  "poster") != 0) ||
-            query_quadoption(OPT_FOLLOWUP_TO_POSTER,
-                             _("Reply by mail as poster prefers?")) != MUTT_YES)
+            (query_quadoption(OPT_FOLLOWUP_TO_POSTER,
+                              _("Reply by mail as poster prefers?")) != MUTT_YES))
         {
           mutt_attach_reply(CURATTACH->fp, hdr, actx,
                             menu->tagprefix ? NULL : CURATTACH->content,
@@ -1369,7 +1371,7 @@ void mutt_view_attachments(struct Header *hdr)
           break;
         }
 #endif
-
+      /* fallthrough */
       case OP_REPLY:
       case OP_GROUP_REPLY:
       case OP_LIST_REPLY:
index 0f5ebb302deb1a41da7e644c568854a2292605c9..0e3b8d1c23bd5f4390e38a96d6be356c99aea4a4 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -80,6 +80,7 @@ static void sighandler(int sig)
       if (!IsEndwin)
         endwin();
       kill(0, SIGSTOP);
+    /* fallthrough */
 
     case SIGCONT:
       if (!IsEndwin)