From: Richard Russon Date: Sat, 16 Dec 2017 14:47:11 +0000 (+0000) Subject: fix use of 'fallthrough' comments X-Git-Tag: neomutt-20180223~65^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c4641780703c4a7c025cdd2970c93adc007c4ad;p=neomutt fix use of 'fallthrough' comments --- diff --git a/commands.c b/commands.c index 1db7f378d..9121da133 100644 --- a/commands.c +++ b/commands.c @@ -854,7 +854,7 @@ int mutt_save_message(struct Header *h, int delete, int decode, int decrypt) case 0: mutt_clear_error(); return 0; - /* non-fatal error: fall through to fetch/append */ + /* non-fatal error: continue to fetch/append */ case 1: break; /* fatal error, abort */ diff --git a/compose.c b/compose.c index 7adaa8892..78287348d 100644 --- a/compose.c +++ b/compose.c @@ -971,7 +971,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ mutt_message_hook(NULL, msg, MUTT_SEND2HOOK); break; } - /* fall through */ + /* fallthrough */ case OP_COMPOSE_EDIT_HEADERS: if ((mutt_str_strcmp("builtin", Editor) != 0) && (op == OP_COMPOSE_EDIT_HEADERS || diff --git a/conn/ssl.c b/conn/ssl.c index 298f32666..547e6bd04 100644 --- a/conn/ssl.c +++ b/conn/ssl.c @@ -1087,7 +1087,7 @@ static int interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, int mutt_message(_("Certificate saved")); mutt_sleep(0); } - /* fall through */ + /* fallthrough */ case OP_MAX + 2: /* accept once */ done = 2; SSL_set_ex_data(ssl, SkipModeExDataIndex, NULL); diff --git a/conn/ssl_gnutls.c b/conn/ssl_gnutls.c index 0dfb998a4..0afc6a95f 100644 --- a/conn/ssl_gnutls.c +++ b/conn/ssl_gnutls.c @@ -864,7 +864,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata, mutt_message(_("Certificate saved")); mutt_sleep(0); } - /* fall through */ + /* fallthrough */ case OP_MAX + 2: /* accept once */ done = 2; break; diff --git a/curs_main.c b/curs_main.c index a92cf42df..78727096a 100644 --- a/curs_main.c +++ b/curs_main.c @@ -2906,8 +2906,8 @@ int mutt_index_menu(void) mutt_check_rescore(Context); break; - case OP_EDIT_OR_VIEW_RAW_MESSAGE: /* fall through */ - case OP_EDIT_RAW_MESSAGE: /* fall through */ + case OP_EDIT_OR_VIEW_RAW_MESSAGE: + case OP_EDIT_RAW_MESSAGE: case OP_VIEW_RAW_MESSAGE: /* TODO split this into 3 cases? */ diff --git a/imap/message.c b/imap/message.c index 4c6881e58..b72610f42 100644 --- a/imap/message.c +++ b/imap/message.c @@ -532,7 +532,7 @@ static void generate_seqset(struct Buffer *b, struct ImapData *idata, { case 1: /* single: convert to a range */ state = 2; - /* fall through */ + /* fallthrough */ case 2: /* extend range ending */ range_end = msn; break; diff --git a/ncrypt/pgppacket.c b/ncrypt/pgppacket.c index 308b7c8d2..82fa5f837 100644 --- a/ncrypt/pgppacket.c +++ b/ncrypt/pgppacket.c @@ -169,7 +169,7 @@ unsigned char *pgp_read_packet(FILE *fp, size_t *len) case 1: bytes = 2; - /* fall through */ + /* fallthrough */ case 2: { diff --git a/pager.c b/pager.c index 6c86996e6..482c451ee 100644 --- a/pager.c +++ b/pager.c @@ -3007,7 +3007,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e ch = -1; break; } - /* fall through */ + /* fallthrough */ case OP_SAVE: if (IsAttach(extra)) { @@ -3015,7 +3015,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e extra->hdr, NULL); break; } - /* fall through */ + /* fallthrough */ case OP_COPY_MESSAGE: case OP_DECODE_SAVE: case OP_DECODE_COPY: diff --git a/recvattach.c b/recvattach.c index 0b3d3451a..ca232921b 100644 --- a/recvattach.c +++ b/recvattach.c @@ -913,7 +913,7 @@ int mutt_attach_display_loop(struct Menu *menu, int op, struct Header *hdr, { case OP_DISPLAY_HEADERS: toggle_option(OPT_WEED); - /* fall through */ + /* fallthrough */ case OP_VIEW_ATTACH: op = mutt_view_attachment(CURATTACH->fp, CURATTACH->content, MUTT_REGULAR, hdr, actx); @@ -958,11 +958,11 @@ int mutt_attach_display_loop(struct Menu *menu, int op, struct Header *hdr, op = OP_NULL; break; } - /* fall through */ + /* fallthrough */ case OP_ATTACH_COLLAPSE: if (recv) return op; - /* fall through */ + /* fallthrough */ default: op = OP_NULL; }