Commit d97b14d
committed
Silence compiler warnings
Rearrange a bit of code to ensure that 'mode' in LWLockRelease is
obviously always set, which seems a bit cleaner and avoids a compiler
warning (thanks to Robert for the suggestion!).
In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.
Neither of these appear to be live bugs but at least gcc
5.4.0-6ubuntu1~16.04.4 doesn't quite have the smarts to realize that.
Discussion: https://www.postgresql.org/message-id/20161129152102.GR13284%40tamriel.snowman.net1 parent 0645dac commit d97b14d
2 files changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1780 | 1780 | | |
1781 | 1781 | | |
1782 | 1782 | | |
1783 | | - | |
1784 | 1783 | | |
1785 | | - | |
1786 | | - | |
1787 | 1784 | | |
1788 | | - | |
1789 | | - | |
| 1785 | + | |
1790 | 1786 | | |
1791 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
1792 | 1791 | | |
1793 | 1792 | | |
1794 | 1793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1128 | 1128 | | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | | - | |
| 1131 | + | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
| 1213 | + | |
| 1214 | + | |
1213 | 1215 | | |
1214 | 1216 | | |
1215 | 1217 | | |
| |||
0 commit comments