- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitb7d9b0c
committed
Suppress variable-set-but-not-used warnings from clang 15.
clang 15+ will issue a set-but-not-used warning when the onlyuse of a variable is in autoincrements (e.g., "foo++;").That's perfectly sensible, but it detects a few more cases thatwe'd not noticed before. Silence the warnings with our usualmethods, such as PG_USED_FOR_ASSERTS_ONLY, or in one case byactually removing a useless variable.One thing that we can't nicely get rid of is that with %pure-parser,Bison emits "yynerrs" as a local variable that falls foul of thiswarning. To silence those, I inserted "(void) yynerrs;" in thetop-level productions of affected grammars.Per recently-established project policy, this is a candidatefor back-patching into out-of-support branches: it suppressesannoying compiler warnings but changes no behavior. Hence,back-patch to 9.5, which is as far as these patches go withoutissues. (A preliminary check shows that the prior branchesneed some other set-but-not-used cleanups too, so I'll leavethem for another day.)Discussion:https://postgr.es/m/514615.1663615243@sss.pgh.pa.us1 parentc922f92 commitb7d9b0c
File tree
6 files changed
+9
-6
lines changed- src
- backend
- access
- gist
- transam
- parser
- utils/adt
- bin/pgbench
6 files changed
+9
-6
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
81 | 81 |
| |
82 | 82 |
| |
83 | 83 |
| |
84 |
| - | |
| 84 | + | |
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1778 | 1778 |
| |
1779 | 1779 |
| |
1780 | 1780 |
| |
1781 |
| - | |
| 1781 | + | |
1782 | 1782 |
| |
1783 | 1783 |
| |
1784 | 1784 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
859 | 859 |
| |
860 | 860 |
| |
861 | 861 |
| |
| 862 | + | |
862 | 863 |
| |
863 | 864 |
| |
864 | 865 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
218 | 218 |
| |
219 | 219 |
| |
220 | 220 |
| |
221 |
| - | |
222 | 221 |
| |
223 | 222 |
| |
224 | 223 |
| |
| |||
320 | 319 |
| |
321 | 320 |
| |
322 | 321 |
| |
323 |
| - | |
324 |
| - | |
| 322 | + | |
325 | 323 |
| |
326 | 324 |
| |
327 | 325 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
| 134 | + | |
134 | 135 |
| |
135 | 136 |
| |
136 | 137 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 |
| |
85 | 88 |
| |
86 | 89 |
| |
|
0 commit comments
Comments
(0)