forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4fbbea2
committed
Suppress compiler warning in relptr_store().
clang 13 with -Wextra warns that "performing pointer subtraction witha null pointer has undefined behavior" in the places where freepage.ctries to set a relptr variable to constant NULL. This appears to bea compiler bug, but it's unlikely to get fixed instantly. Fortunately,we can work around it by introducing an inline support function, whichseems like a good change anyway because it removes the macro's existingdouble-evaluation hazard.Backpatch to v10 where this code was introduced.Patch by me, based on an idea of Andres Freund's.Discussion:https://postgr.es/m/48826.1648310694@sss.pgh.pa.us1 parent6e9ffcf commit4fbbea2
1 file changed
+15
-2
lines changedLines changed: 15 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
59 | 72 |
| |
60 | 73 |
| |
61 | 74 |
| |
62 | 75 |
| |
63 |
| - | |
| 76 | + | |
64 | 77 |
| |
65 | 78 |
| |
66 | 79 |
| |
67 | 80 |
| |
68 | 81 |
| |
69 | 82 |
| |
70 | 83 |
| |
71 |
| - | |
| 84 | + | |
72 | 85 |
| |
73 | 86 |
| |
74 | 87 |
| |
|
0 commit comments
Comments
(0)