Commit 3c12be3
committed
UCS/BITMAP/TEST: Fix build with >= Clang 21
First caught on Gentoo LLVM with Clang 21.1.5 and LLVM 21.1.5
Build with fail with the following error message
core/ucp_context.c:2673:47: error: default initialization of an object of type
'typeof (*tl_bitmap_super)' (aka 'const ucp_tl_bitmap_t') leaves the object uninitialized
[-Werror,-Wdefault-const-init-var-unsafe]
/var/tmp/portage/sys-cluster/ucx-1.19.0/work/ucx-1.19.0/src/ucs/datastruct/static_bitmap.h:250:5: note:
expanded from macro 'UCS_STATIC_BITMAP_NOT'
250 | UCS_STATIC_BITMAP_UNARY_OP(_bitmap, not, UCS_PP_UNIQUE_ID)
| ^
/var/tmp/portage/sys-cluster/ucx-1.19.0/work/ucx-1.19.0/src/ucs/datastruct/static_bitmap.h:239:5: note:
expanded from macro 'UCS_STATIC_BITMAP_UNARY_OP'
239 | _UCS_STATIC_BITMAP_UNARY_OP(_bitmap, _op_name, _uid)
| ^
/var/tmp/portage/sys-cluster/ucx-1.19.0/work/ucx-1.19.0/src/ucs/datastruct/static_bitmap.h:232:29: note:
expanded from macro '_UCS_STATIC_BITMAP_UNARY_OP'
232 | ucs_typeof(_bitmap) _r_##_uid; \
| ^
<scratch space>:54:1: note: expanded from here
54 | _r_0
| ^
core/ucp_context.c:2672:25: error: default initialization of an object of type
'typeof (*tl_bitmap)' (aka 'const ucp_tl_bitmap_t') leaves the object uninitialized
[-Werror,-Wdefault-const-init-var-unsafe]
2672 | ucp_tl_bitmap_t b = UCS_STATIC_BITMAP_AND(*tl_bitmap,
| ^
The cause is probably Clang now being more strict and ucs_typeof(_bitmap) _r_##_uid being declared and not used.
Signed-off-by: Brahmajit Das <[email protected]>1 parent e29e5f5 commit 3c12be3
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
0 commit comments