- Notifications
You must be signed in to change notification settings - Fork5k
Commit9300188
committed
Fix up misuse of "volatile" in contrib/xml2.
What we want in these places is "xmlChar *volatile ptr",not "volatile xmlChar *ptr". The former means that thepointer variable itself needs to be treated as volatile,while the latter says that what it points to is volatile.Since the point here is to ensure that the pointer variablesdon't go crazy after a longjmp, it's the former semanticsthat we need. The misplacement of "volatile" also ledto needing to cast away volatile in some places.Also fix a number of places where variables that are assigned towithin a PG_TRY and then used after it were not initialized ornot marked as volatile. (A few buildfarm members were issuing"may be used uninitialized" warnings about some of these variables,which is what drew my attention to this area.) In most casesthese variables were being set as the last step within the PG_TRYblock, which might mean that we could get away without the "volatile"marking. But doing that seems unsafe and is definitely not per ourcoding conventions.These problems seem to have come in with7320611, so no needfor back-patch.1 parente03c952 commit9300188
2 files changed
+29
-30
lines changedLines changed: 24 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 |
| - | |
92 |
| - | |
| 91 | + | |
| 92 | + | |
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
| 114 | + | |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
| 123 | + | |
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
148 |
| - | |
149 |
| - | |
| 148 | + | |
150 | 149 |
| |
151 | 150 |
| |
152 |
| - | |
| 151 | + | |
153 | 152 |
| |
154 | 153 |
| |
155 | 154 |
| |
| |||
168 | 167 |
| |
169 | 168 |
| |
170 | 169 |
| |
171 |
| - | |
| 170 | + | |
172 | 171 |
| |
173 | 172 |
| |
174 | 173 |
| |
| |||
257 | 256 |
| |
258 | 257 |
| |
259 | 258 |
| |
260 |
| - | |
261 |
| - | |
| 259 | + | |
| 260 | + | |
262 | 261 |
| |
263 | 262 |
| |
264 | 263 |
| |
| |||
302 | 301 |
| |
303 | 302 |
| |
304 | 303 |
| |
305 |
| - | |
306 |
| - | |
| 304 | + | |
| 305 | + | |
307 | 306 |
| |
308 | 307 |
| |
309 | 308 |
| |
| |||
344 | 343 |
| |
345 | 344 |
| |
346 | 345 |
| |
347 |
| - | |
348 |
| - | |
| 346 | + | |
| 347 | + | |
349 | 348 |
| |
350 | 349 |
| |
351 | 350 |
| |
| |||
398 | 397 |
| |
399 | 398 |
| |
400 | 399 |
| |
401 |
| - | |
402 |
| - | |
403 |
| - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
404 | 403 |
| |
405 | 404 |
| |
406 | 405 |
| |
| |||
444 | 443 |
| |
445 | 444 |
| |
446 | 445 |
| |
447 |
| - | |
448 |
| - | |
| 446 | + | |
| 447 | + | |
449 | 448 |
| |
450 | 449 |
| |
451 | 450 |
| |
| |||
518 | 517 |
| |
519 | 518 |
| |
520 | 519 |
| |
521 |
| - | |
| 520 | + | |
522 | 521 |
| |
523 | 522 |
| |
524 | 523 |
| |
| |||
537 | 536 |
| |
538 | 537 |
| |
539 | 538 |
| |
540 |
| - | |
| 539 | + | |
| 540 | + | |
541 | 541 |
| |
542 |
| - | |
543 | 542 |
| |
544 | 543 |
| |
545 | 544 |
| |
| |||
578 | 577 |
| |
579 | 578 |
| |
580 | 579 |
| |
581 |
| - | |
| 580 | + | |
582 | 581 |
| |
583 | 582 |
| |
584 | 583 |
| |
| |||
587 | 586 |
| |
588 | 587 |
| |
589 | 588 |
| |
590 |
| - | |
| 589 | + | |
591 | 590 |
| |
592 | 591 |
| |
593 | 592 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
| 61 | + | |
63 | 62 |
| |
64 | 63 |
| |
65 | 64 |
| |
| |||
80 | 79 |
| |
81 | 80 |
| |
82 | 81 |
| |
| 82 | + | |
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
| 163 | + | |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
| 180 | + | |
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
|
0 commit comments
Comments
(0)