- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit85c077f
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 parentd4c1618 commit85c077f
File tree
5 files changed
+8
-6
lines changed- src
- backend
- access
- gist
- transam
- parser
- utils/adt
- bin/pgbench
5 files changed
+8
-6
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
| 258 | + | |
259 | 259 |
| |
260 | 260 |
| |
261 | 261 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1923 | 1923 |
| |
1924 | 1924 |
| |
1925 | 1925 |
| |
1926 |
| - | |
| 1926 | + | |
1927 | 1927 |
| |
1928 | 1928 |
| |
1929 | 1929 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
734 | 734 |
| |
735 | 735 |
| |
736 | 736 |
| |
| 737 | + | |
737 | 738 |
| |
738 | 739 |
| |
739 | 740 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
219 |
| - | |
220 | 219 |
| |
221 | 220 |
| |
222 | 221 |
| |
| |||
320 | 319 |
| |
321 | 320 |
| |
322 | 321 |
| |
323 |
| - | |
324 |
| - | |
| 322 | + | |
325 | 323 |
| |
326 | 324 |
| |
327 | 325 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
63 |
| - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 |
| |
65 | 68 |
| |
66 | 69 |
| |
|
0 commit comments
Comments
(0)