forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit41c912c
committed
Clean up warnings from -Wimplicit-fallthrough.
Recent gcc can warn about switch-case fall throughs that are notexplicitly labeled as intentional. This seems like a good thing,so clean up the warnings exposed thereby by labeling all suchcases with comments that gcc will recognize.In files that already had one or more suitable comments, I generallymatched the existing style of those. Otherwise I went with/* FALLTHROUGH */, which is one of the spellings approved at themore-restrictive-than-default level -Wimplicit-fallthrough=4.(At the default level you can also spell it /* FALL ?THRU */,and it's not picky about case. What you can't do is includeadditional text in the same comment, so some existing commentscontaining versions of this aren't good enough.)Testing with gcc 8.0.1 (Fedora 28's current version), I found thatI also had to put explicit "break"s after elog(ERROR) or ereport(ERROR);apparently, for this purpose gcc doesn't recognize that those don'treturn. That seems like possibly a gcc bug, but it's fine becausein most places we did that anyway; so this amounts to a visit from thestyle police.Discussion:https://postgr.es/m/15083.1525207729@sss.pgh.pa.us1 parent1667148 commit41c912c
File tree
28 files changed
+128
-25
lines changed- contrib
- btree_gin
- pageinspect
- src
- backend
- access/hash
- catalog
- commands
- executor
- parser
- regex
- tcop
- utils
- adt
- misc
- sort
- bin/pgbench
- interfaces/ecpg
- pgtypeslib
- preproc
- pl
- plpgsql/src
- tcl
28 files changed
+128
-25
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
| 91 | + | |
91 | 92 |
| |
92 | 93 |
| |
93 | 94 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
| 100 | + | |
100 | 101 |
| |
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
| 105 | + | |
104 | 106 |
| |
105 | 107 |
| |
106 | 108 |
| |
107 | 109 |
| |
| 110 | + | |
108 | 111 |
| |
109 | 112 |
| |
110 | 113 |
| |
111 | 114 |
| |
| 115 | + | |
112 | 116 |
| |
113 | 117 |
| |
114 | 118 |
| |
|
Lines changed: 52 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
466 | 466 |
| |
467 | 467 |
| |
468 | 468 |
| |
469 |
| - | |
470 | 469 |
| |
471 | 470 |
| |
| 471 | + | |
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
508 |
| - | |
509 | 508 |
| |
510 | 509 |
| |
| 510 | + | |
511 | 511 |
| |
512 | 512 |
| |
513 | 513 |
| |
| |||
558 | 558 |
| |
559 | 559 |
| |
560 | 560 |
| |
561 |
| - | |
| 561 | + | |
562 | 562 |
| |
563 | 563 |
| |
564 | 564 |
| |
| 565 | + | |
565 | 566 |
| |
566 | 567 |
| |
| 568 | + | |
567 | 569 |
| |
568 | 570 |
| |
569 |
| - | |
| 571 | + | |
570 | 572 |
| |
| 573 | + | |
571 | 574 |
| |
| 575 | + | |
572 | 576 |
| |
573 | 577 |
| |
| 578 | + | |
574 | 579 |
| |
575 | 580 |
| |
| 581 | + | |
576 | 582 |
| |
577 | 583 |
| |
| 584 | + | |
578 | 585 |
| |
579 | 586 |
| |
| 587 | + | |
580 | 588 |
| |
581 | 589 |
| |
| 590 | + | |
582 | 591 |
| |
583 | 592 |
| |
| 593 | + | |
584 | 594 |
| |
585 | 595 |
| |
586 | 596 |
| |
587 | 597 |
| |
588 | 598 |
| |
589 |
| - | |
| 599 | + | |
590 | 600 |
| |
591 | 601 |
| |
592 | 602 |
| |
| 603 | + | |
593 | 604 |
| |
594 | 605 |
| |
| 606 | + | |
595 | 607 |
| |
596 | 608 |
| |
597 |
| - | |
| 609 | + | |
598 | 610 |
| |
| 611 | + | |
599 | 612 |
| |
| 613 | + | |
600 | 614 |
| |
601 | 615 |
| |
| 616 | + | |
602 | 617 |
| |
603 | 618 |
| |
| 619 | + | |
604 | 620 |
| |
605 | 621 |
| |
| 622 | + | |
606 | 623 |
| |
607 | 624 |
| |
| 625 | + | |
608 | 626 |
| |
609 | 627 |
| |
| 628 | + | |
610 | 629 |
| |
611 | 630 |
| |
| 631 | + | |
612 | 632 |
| |
613 | 633 |
| |
614 | 634 |
| |
| |||
686 | 706 |
| |
687 | 707 |
| |
688 | 708 |
| |
689 |
| - | |
690 | 709 |
| |
691 | 710 |
| |
| 711 | + | |
692 | 712 |
| |
693 | 713 |
| |
694 | 714 |
| |
| |||
725 | 745 |
| |
726 | 746 |
| |
727 | 747 |
| |
728 |
| - | |
729 | 748 |
| |
730 | 749 |
| |
| 750 | + | |
731 | 751 |
| |
732 | 752 |
| |
733 | 753 |
| |
| |||
778 | 798 |
| |
779 | 799 |
| |
780 | 800 |
| |
781 |
| - | |
| 801 | + | |
782 | 802 |
| |
783 | 803 |
| |
784 | 804 |
| |
| 805 | + | |
785 | 806 |
| |
786 | 807 |
| |
| 808 | + | |
787 | 809 |
| |
788 | 810 |
| |
789 |
| - | |
| 811 | + | |
790 | 812 |
| |
| 813 | + | |
791 | 814 |
| |
| 815 | + | |
792 | 816 |
| |
793 | 817 |
| |
| 818 | + | |
794 | 819 |
| |
795 | 820 |
| |
| 821 | + | |
796 | 822 |
| |
797 | 823 |
| |
| 824 | + | |
798 | 825 |
| |
799 | 826 |
| |
| 827 | + | |
800 | 828 |
| |
801 | 829 |
| |
| 830 | + | |
802 | 831 |
| |
803 | 832 |
| |
| 833 | + | |
804 | 834 |
| |
805 | 835 |
| |
806 | 836 |
| |
807 | 837 |
| |
808 | 838 |
| |
809 |
| - | |
| 839 | + | |
810 | 840 |
| |
811 | 841 |
| |
812 | 842 |
| |
| 843 | + | |
813 | 844 |
| |
814 | 845 |
| |
| 846 | + | |
815 | 847 |
| |
816 | 848 |
| |
817 |
| - | |
| 849 | + | |
818 | 850 |
| |
| 851 | + | |
819 | 852 |
| |
| 853 | + | |
820 | 854 |
| |
821 | 855 |
| |
| 856 | + | |
822 | 857 |
| |
823 | 858 |
| |
| 859 | + | |
824 | 860 |
| |
825 | 861 |
| |
| 862 | + | |
826 | 863 |
| |
827 | 864 |
| |
| 865 | + | |
828 | 866 |
| |
829 | 867 |
| |
| 868 | + | |
830 | 869 |
| |
831 | 870 |
| |
| 871 | + | |
832 | 872 |
| |
833 | 873 |
| |
834 | 874 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2092 | 2092 |
| |
2093 | 2093 |
| |
2094 | 2094 |
| |
| 2095 | + | |
2095 | 2096 |
| |
2096 | 2097 |
| |
2097 | 2098 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1479 | 1479 |
| |
1480 | 1480 |
| |
1481 | 1481 |
| |
1482 |
| - | |
| 1482 | + | |
| 1483 | + | |
1483 | 1484 |
| |
1484 | 1485 |
| |
1485 | 1486 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
440 | 440 |
| |
441 | 441 |
| |
442 | 442 |
| |
| 443 | + | |
443 | 444 |
| |
444 | 445 |
| |
445 | 446 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3338 | 3338 |
| |
3339 | 3339 |
| |
3340 | 3340 |
| |
| 3341 | + | |
3341 | 3342 |
| |
3342 | 3343 |
| |
3343 | 3344 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2741 | 2741 |
| |
2742 | 2742 |
| |
2743 | 2743 |
| |
| 2744 | + | |
2744 | 2745 |
| |
2745 | 2746 |
| |
2746 | 2747 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| 205 | + | |
205 | 206 |
| |
206 | 207 |
| |
207 | 208 |
| |
| |||
365 | 366 |
| |
366 | 367 |
| |
367 | 368 |
| |
| 369 | + | |
368 | 370 |
| |
369 | 371 |
| |
370 | 372 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
| 259 | + | |
259 | 260 |
| |
260 | 261 |
| |
261 | 262 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1390 | 1390 |
| |
1391 | 1391 |
| |
1392 | 1392 |
| |
| 1393 | + | |
1393 | 1394 |
| |
1394 | 1395 |
| |
1395 | 1396 |
| |
| |||
1399 | 1400 |
| |
1400 | 1401 |
| |
1401 | 1402 |
| |
| 1403 | + | |
1402 | 1404 |
| |
1403 | 1405 |
| |
1404 | 1406 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14855 | 14855 |
| |
14856 | 14856 |
| |
14857 | 14857 |
| |
| 14858 | + | |
14858 | 14859 |
| |
14859 | 14860 |
| |
14860 | 14861 |
| |
14861 | 14862 |
| |
14862 | 14863 |
| |
14863 | 14864 |
| |
| 14865 | + | |
14864 | 14866 |
| |
14865 | 14867 |
| |
14866 | 14868 |
| |
14867 | 14869 |
| |
14868 | 14870 |
| |
14869 | 14871 |
| |
| 14872 | + | |
14870 | 14873 |
| |
14871 | 14874 |
| |
14872 | 14875 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3829 | 3829 |
| |
3830 | 3830 |
| |
3831 | 3831 |
| |
| 3832 | + | |
3832 | 3833 |
| |
3833 | 3834 |
| |
3834 | 3835 |
| |
3835 | 3836 |
| |
3836 | 3837 |
| |
3837 | 3838 |
| |
| 3839 | + | |
3838 | 3840 |
| |
3839 | 3841 |
| |
3840 | 3842 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
875 | 875 |
| |
876 | 876 |
| |
877 | 877 |
| |
| 878 | + | |
878 | 879 |
| |
879 | 880 |
| |
880 | 881 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
909 | 909 |
| |
910 | 910 |
| |
911 | 911 |
| |
912 |
| - | |
| 912 | + | |
| 913 | + | |
913 | 914 |
| |
914 | 915 |
| |
915 | 916 |
| |
|
0 commit comments
Comments
(0)