- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0fe954c
committed
Add -Wshadow=compatible-local to the standard compilation flags
Sincecd4e8ca, we've been able to build the source tree with-Wshadow=compatible-local without any warnings. Lots of work was done byJustin Pryzby and I (David) to get all our code to compile warning freewith that flag. In that process, 2 bugs (16d69ec andaf7d270) werediscovered and fixed. Additionally, "git log --grep=shadow" shows thatthere is no shortage of other bugs that have been fixed over the yearswhich were caused by variable shadowing.In light of the above, it seems very much worthwhile to add at least-Wshadow=compatible-local to our standard compilation flags. We *may*want to go further and take this to -Wshadow=local in the future, butwe're not ready for that today, so let's add -Wshadow=compatible-local nowto help make sure we don't introduce further local variable shadowing.Author: Andres FreundDiscussion:https://postgr.es/m/20221006003920.6xlqaoccxwisza5k@awork3.anarazel.de1 parent80ef926 commit0fe954c
3 files changed
+94
-0
lines changedLines changed: 91 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5852 | 5852 |
| |
5853 | 5853 |
| |
5854 | 5854 |
| |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
| 5870 | + | |
| 5871 | + | |
| 5872 | + | |
| 5873 | + | |
| 5874 | + | |
| 5875 | + | |
| 5876 | + | |
| 5877 | + | |
| 5878 | + | |
| 5879 | + | |
| 5880 | + | |
| 5881 | + | |
| 5882 | + | |
| 5883 | + | |
| 5884 | + | |
| 5885 | + | |
| 5886 | + | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
| 5894 | + | |
| 5895 | + | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
| 5899 | + | |
| 5900 | + | |
| 5901 | + | |
| 5902 | + | |
| 5903 | + | |
| 5904 | + | |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
| 5912 | + | |
| 5913 | + | |
| 5914 | + | |
| 5915 | + | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
| 5919 | + | |
| 5920 | + | |
| 5921 | + | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
| 5925 | + | |
| 5926 | + | |
| 5927 | + | |
| 5928 | + | |
| 5929 | + | |
| 5930 | + | |
| 5931 | + | |
| 5932 | + | |
| 5933 | + | |
| 5934 | + | |
| 5935 | + | |
| 5936 | + | |
| 5937 | + | |
| 5938 | + | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
| 5944 | + | |
| 5945 | + | |
5855 | 5946 |
| |
5856 | 5947 |
| |
5857 | 5948 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
508 | 508 |
| |
509 | 509 |
| |
510 | 510 |
| |
| 511 | + | |
| 512 | + | |
511 | 513 |
| |
512 | 514 |
| |
513 | 515 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1709 | 1709 |
| |
1710 | 1710 |
| |
1711 | 1711 |
| |
| 1712 | + | |
1712 | 1713 |
| |
1713 | 1714 |
| |
1714 | 1715 |
| |
|
0 commit comments
Comments
(0)