Commit 9650811
committed
PS-9764 fix: Add clang-20 to Azure Pipelines and fix clang-20 compilation issues
https://perconadev.atlassian.net/browse/PS-9764
Fixed the following issue with calling 'memset()' on a
nontrivially-constructed object ('TREE') by calling the placement new
operator with empty brace initializer '{}' instead:
/percona-server-8.0/storage/myisam/ft_boolean_search.cc:531:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'TREE' [-Werror,-Wnontrivial-memcall]
531 | memset(&ftb->no_dupes, 0, sizeof(TREE));
| ^
Fixed the following group of issues with calling 'memset()' on
nontrivially-constructed objects ('TREE', 'MI_SORT_PARAM', 'MI_INFO') by
declaring those objects with empty brace initializer '{}':
/percona-server-8.0/storage/myisam/ft_nlq_search.cc:241:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'TREE' [-Werror,-Wnontrivial-memcall]
241 | memset(&wtree, 0, sizeof(wtree));
| ^
/home/yura/ws/percona-server-8.0/storage/myisam/myisamchk.cc:1404:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'MI_SORT_PARAM' [-Werror,-Wnontrivial-memcall]
1404 | memset(&sort_param, 0, sizeof(sort_param));
| ^
/home/yura/ws/percona-server-8.0/storage/myisam/mi_open.cc:122:10: error: first argument in call to 'memset' is a pointer to non-trivially copyable type 'MI_INFO' [-Werror,-Wnontrivial-memcall]
122 | memset(&info, 0, sizeof(info));
| ^
The following warning suppressed as it comes from the 'rocksdb' submodule
code:
/percona-server-8.0/storage/rocksdb/rocksdb/port/mmap.cc:46:15: error: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'rocksdb::MemMapping' [-Werror,-Wnontrivial-memcall]
46 | std::memcpy(this, &other, sizeof(*this));
| ^
Fixed the following literal operator warning:
/percona-server-8.0/storage/temptable/include/temptable/constants.h:36:48: error: identifier '_KiB' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator]
36 | inline constexpr unsigned long long operator"" _KiB(
| ~~~~~~~~~~~^~~~
| operator""_KiB
Fixed the following extra semicolon warning in NDB code:
/percona-server-8.0/storage/ndb/src/kernel/vm/Configuration.cpp:653:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
653 | };
| ^
Removed adding '-Wno-enum-constexpr-conversion' to the compiler options for
clang >= 18 for 'sql_gis' as this option no longer exists in the 'clang-20'
and Oracle fixed this issue properly in Bug #36292498
"Compile MySQL with clang 18 [noclose]"
(commit mysql/mysql-server@5e066e70ebb).1 parent 112b7f9 commit 9650811
File tree
11 files changed
+16
-27
lines changed- sql
- storage
- myisam
- ndb/src/kernel/vm
- rocksdb
- temptable/include/temptable
- unittest/gunit
11 files changed
+16
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | 965 | | |
971 | 966 | | |
972 | 967 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
220 | | - | |
| 220 | + | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | 241 | | |
244 | 242 | | |
245 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | | - | |
| 1415 | + | |
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
1420 | 1419 | | |
1421 | 1420 | | |
1422 | 1421 | | |
| |||
2020 | 2019 | | |
2021 | 2020 | | |
2022 | 2021 | | |
2023 | | - | |
| 2022 | + | |
2024 | 2023 | | |
2025 | 2024 | | |
2026 | 2025 | | |
| |||
2044 | 2043 | | |
2045 | 2044 | | |
2046 | 2045 | | |
2047 | | - | |
2048 | 2046 | | |
2049 | 2047 | | |
2050 | 2048 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | 122 | | |
124 | 123 | | |
125 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
1400 | | - | |
| 1400 | + | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
1404 | | - | |
1405 | 1404 | | |
1406 | 1405 | | |
1407 | 1406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
| 656 | + | |
657 | 657 | | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
| 661 | + | |
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
0 commit comments