Mercurial > vim
comparison src/buffer.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 | ac6e56d8950e |
children | 185f8dbdcf26 |
comparison
equal
deleted
inserted
replaced
12673:2b845e7b9727 | 12674:e769c912fcd9 |
---|---|
4323 num = wp->w_buffer->b_fnum; | 4323 num = wp->w_buffer->b_fnum; |
4324 break; | 4324 break; |
4325 | 4325 |
4326 case STL_OFFSET_X: | 4326 case STL_OFFSET_X: |
4327 base = 'X'; | 4327 base = 'X'; |
4328 /* FALLTHROUGH */ | |
4328 case STL_OFFSET: | 4329 case STL_OFFSET: |
4329 #ifdef FEAT_BYTEOFF | 4330 #ifdef FEAT_BYTEOFF |
4330 l = ml_find_line_or_offset(wp->w_buffer, wp->w_cursor.lnum, NULL); | 4331 l = ml_find_line_or_offset(wp->w_buffer, wp->w_cursor.lnum, NULL); |
4331 num = (wp->w_buffer->b_ml.ml_flags & ML_EMPTY) || l < 0 ? | 4332 num = (wp->w_buffer->b_ml.ml_flags & ML_EMPTY) || l < 0 ? |
4332 0L : l + 1 + (!(State & INSERT) && empty_line ? | 4333 0L : l + 1 + (!(State & INSERT) && empty_line ? |
4334 #endif | 4335 #endif |
4335 break; | 4336 break; |
4336 | 4337 |
4337 case STL_BYTEVAL_X: | 4338 case STL_BYTEVAL_X: |
4338 base = 'X'; | 4339 base = 'X'; |
4340 /* FALLTHROUGH */ | |
4339 case STL_BYTEVAL: | 4341 case STL_BYTEVAL: |
4340 num = byteval; | 4342 num = byteval; |
4341 if (num == NL) | 4343 if (num == NL) |
4342 num = 0; | 4344 num = 0; |
4343 else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC) | 4345 else if (num == CAR && get_fileformat(wp->w_buffer) == EOL_MAC) |