comparison src/spell.c @ 12674:e769c912fcd9 v8.0.1215

patch 8.0.1215: newer gcc warns for implicit fallthrough commit https://github.com/vim/vim/commit/2f40d129bf45cd35976e4120336ae6d504f5a5dd Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 24 21:49:36 2017 +0200 patch 8.0.1215: newer gcc warns for implicit fallthrough Problem: Newer gcc warns for implicit fallthrough. Solution: Consistently use a FALLTHROUGH comment. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Oct 2017 22:00:06 +0200
parents 68d7bc045dbe
children ac42c4b11dbc
comparison
equal deleted inserted replaced
12673:2b845e7b9727 12674:e769c912fcd9
5017 sp->ts_state = STATE_DEL; 5017 sp->ts_state = STATE_DEL;
5018 break; 5018 break;
5019 } 5019 }
5020 PROF_STORE(sp->ts_state) 5020 PROF_STORE(sp->ts_state)
5021 sp->ts_state = STATE_PLAIN; 5021 sp->ts_state = STATE_PLAIN;
5022 /*FALLTHROUGH*/ 5022 /* FALLTHROUGH */
5023 5023
5024 case STATE_PLAIN: 5024 case STATE_PLAIN:
5025 /* 5025 /*
5026 * Go over all possible bytes at this node, add each to tword[] 5026 * Go over all possible bytes at this node, add each to tword[]
5027 * and use child node. "ts_curi" is the index. 5027 * and use child node. "ts_curi" is the index.
5241 if (fword[sp->ts_fidx] == fword[sp->ts_fidx + 1]) 5241 if (fword[sp->ts_fidx] == fword[sp->ts_fidx + 1])
5242 stack[depth].ts_score -= SCORE_DEL - SCORE_DELDUP; 5242 stack[depth].ts_score -= SCORE_DEL - SCORE_DELDUP;
5243 } 5243 }
5244 break; 5244 break;
5245 } 5245 }
5246 /*FALLTHROUGH*/ 5246 /* FALLTHROUGH */
5247 5247
5248 case STATE_INS_PREP: 5248 case STATE_INS_PREP:
5249 if (sp->ts_flags & TSF_DIDDEL) 5249 if (sp->ts_flags & TSF_DIDDEL)
5250 { 5250 {
5251 /* If we just deleted a byte then inserting won't make sense, 5251 /* If we just deleted a byte then inserting won't make sense,
5275 } 5275 }
5276 ++sp->ts_curi; 5276 ++sp->ts_curi;
5277 } 5277 }
5278 break; 5278 break;
5279 5279
5280 /*FALLTHROUGH*/ 5280 /* FALLTHROUGH */
5281 5281
5282 case STATE_INS: 5282 case STATE_INS:
5283 /* Insert one byte. Repeat this for each possible byte at this 5283 /* Insert one byte. Repeat this for each possible byte at this
5284 * node. */ 5284 * node. */
5285 n = sp->ts_arridx; 5285 n = sp->ts_arridx;
5462 { 5462 {
5463 c = *p; 5463 c = *p;
5464 *p = p[1]; 5464 *p = p[1];
5465 p[1] = c; 5465 p[1] = c;
5466 } 5466 }
5467 /*FALLTHROUGH*/ 5467 /* FALLTHROUGH */
5468 5468
5469 case STATE_SWAP3: 5469 case STATE_SWAP3:
5470 /* Swap two bytes, skipping one: "123" -> "321". We change 5470 /* Swap two bytes, skipping one: "123" -> "321". We change
5471 * "fword" here, it's changed back afterwards at STATE_UNSWAP3. */ 5471 * "fword" here, it's changed back afterwards at STATE_UNSWAP3. */
5472 p = fword + sp->ts_fidx; 5472 p = fword + sp->ts_fidx;
5701 c = *p; 5701 c = *p;
5702 *p = p[1]; 5702 *p = p[1];
5703 p[1] = p[2]; 5703 p[1] = p[2];
5704 p[2] = c; 5704 p[2] = c;
5705 } 5705 }
5706 /*FALLTHROUGH*/ 5706 /* FALLTHROUGH */
5707 5707
5708 case STATE_REP_INI: 5708 case STATE_REP_INI:
5709 /* Check if matching with REP items from the .aff file would work. 5709 /* Check if matching with REP items from the .aff file would work.
5710 * Quickly skip if: 5710 * Quickly skip if:
5711 * - there are no REP items and we are not in the soundfold trie 5711 * - there are no REP items and we are not in the soundfold trie
5734 break; 5734 break;
5735 } 5735 }
5736 5736
5737 PROF_STORE(sp->ts_state) 5737 PROF_STORE(sp->ts_state)
5738 sp->ts_state = STATE_REP; 5738 sp->ts_state = STATE_REP;
5739 /*FALLTHROUGH*/ 5739 /* FALLTHROUGH */
5740 5740
5741 case STATE_REP: 5741 case STATE_REP:
5742 /* Try matching with REP items from the .aff file. For each match 5742 /* Try matching with REP items from the .aff file. For each match
5743 * replace the characters and check if the resulting word is 5743 * replace the characters and check if the resulting word is
5744 * valid. */ 5744 * valid. */