- Notifications
You must be signed in to change notification settings - Fork28
Commita928484
committed
Clean up some stuff in new contrib/bloom module.
Coverity complained about implicit sign-extension in theBloomPageGetFreeSpace macro, probably because sizeOfBloomTuple isn't wideenough for size calculations. No overflow is really possible as long asmaxoff and sizeOfBloomTuple are small enough to represent a realisticsituation, but it seems like a good idea to declare sizeOfBloomTuple asSize not int32.Add missing check on BloomPageAddItem() result, again from Coverity.Avoid core dump due to not allocating so->sign array whenscan->numberOfKeys is zero. Also thanks to Coverity.Use FLEXIBLE_ARRAY_MEMBER rather than declaring an array as size 1when it isn't necessarily.Very minor beautification of related code.Unfortunately, none of the Coverity-detected mistakes look like theycould account for the remaining buildfarm unhappiness with thismodule. It's barely possible that the FLEXIBLE_ARRAY_MEMBER mistakedoes account for that, if it's enabling bogus compiler optimizations;but I'm not terribly optimistic. We probably still have bugs tofind here.1 parent3e4b7d8 commita928484
3 files changed
+15
-7
lines changedLines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
99 |
| - | |
| 99 | + | |
100 | 100 |
| |
101 | 101 |
| |
102 |
| - | |
| 102 | + | |
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 |
| - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
302 | 307 |
| |
303 | 308 |
| |
304 | 309 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
118 | 118 |
| |
119 | 119 |
| |
120 | 120 |
| |
121 |
| - | |
| 121 | + | |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
| |||
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 |
| - | |
| 137 | + | |
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
97 |
| - | |
| 97 | + | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| |||
151 | 151 |
| |
152 | 152 |
| |
153 | 153 |
| |
154 |
| - | |
| 154 | + | |
155 | 155 |
| |
156 | 156 |
| |
| 157 | + | |
157 | 158 |
| |
| 159 | + | |
| 160 | + | |
158 | 161 |
| |
159 | 162 |
| |
160 | 163 |
| |
|
0 commit comments
Comments
(0)