Commit cae1863
MDEV-33439 Fix build with libxml2 2.12
libxml2 2.12.0 made `xmlGetLastError()` return `const` pointer: https://gitlab.gnome.org/GNOME/libxml2/-/commit/61034116d0a3c8b295c6137956adc3ae55720711 Clang 16 does not like this: error: assigning to 'xmlErrorPtr' (aka '_xmlError *') from 'const xmlError *' (aka 'const _xmlError *') discards qualifiers error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *') with an rvalue of type 'const xmlError *' (aka 'const _xmlError *') Let’s update the variables to `const`. For older versions, it will be automatically converted. But then `xmlResetError(xmlError*)` will not like the `const` pointer: error: no matching function for call to 'xmlResetError' note: candidate function not viable: 1st argument ('const xmlError *' (aka 'const _xmlError *')) would lose const qualifier Let’s replace it with `xmlResetLastError()`. ALso remove `LIBXMLDOC::Xerr` protected member property. It was introduced in 65b0e54 along with the `xmlResetError` calls. It does not appear to be used for anything.1 parent 3281b6b commit cae1863
1 file changed
+19
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
327 | 326 | | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
331 | 329 | | |
332 | 330 | | |
333 | 331 | | |
| |||
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
368 | | - | |
369 | | - | |
| 366 | + | |
| 367 | + | |
370 | 368 | | |
371 | 369 | | |
372 | 370 | | |
| |||
505 | 503 | | |
506 | 504 | | |
507 | 505 | | |
508 | | - | |
| 506 | + | |
509 | 507 | | |
510 | | - | |
| 508 | + | |
511 | 509 | | |
512 | 510 | | |
513 | 511 | | |
| |||
546 | 544 | | |
547 | 545 | | |
548 | 546 | | |
549 | | - | |
550 | | - | |
| 547 | + | |
| 548 | + | |
551 | 549 | | |
552 | 550 | | |
553 | 551 | | |
554 | 552 | | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
558 | | - | |
559 | | - | |
| 556 | + | |
| 557 | + | |
560 | 558 | | |
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
564 | 562 | | |
565 | 563 | | |
566 | 564 | | |
567 | | - | |
568 | | - | |
| 565 | + | |
| 566 | + | |
569 | 567 | | |
570 | 568 | | |
571 | 569 | | |
572 | 570 | | |
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
576 | | - | |
577 | | - | |
| 574 | + | |
| 575 | + | |
578 | 576 | | |
579 | 577 | | |
580 | 578 | | |
| |||
590 | 588 | | |
591 | 589 | | |
592 | 590 | | |
| 591 | + | |
593 | 592 | | |
594 | 593 | | |
595 | 594 | | |
| |||
649 | 648 | | |
650 | 649 | | |
651 | 650 | | |
652 | | - | |
653 | | - | |
654 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
655 | 654 | | |
656 | | - | |
| 655 | + | |
657 | 656 | | |
658 | 657 | | |
659 | 658 | | |
| |||
1079 | 1078 | | |
1080 | 1079 | | |
1081 | 1080 | | |
1082 | | - | |
| 1081 | + | |
1083 | 1082 | | |
1084 | 1083 | | |
1085 | 1084 | | |
| |||
1122 | 1121 | | |
1123 | 1122 | | |
1124 | 1123 | | |
1125 | | - | |
| 1124 | + | |
1126 | 1125 | | |
1127 | 1126 | | |
1128 | 1127 | | |
| |||
0 commit comments