The Clang 21 compiler starts generating the following warnings whenever a wrapper function doesn't specify the type information to the compiler.
[3/270] Building C object test/utility/CMakeFiles/test_util.dir/misc.c.o
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:515:1: warning: function dcalloc might be an allocator wrapper [-Wallocator-wrappers]
515 | dcalloc(size_t number, size_t size)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:523:9: note: value obtained from allocator call is returned here
523 | return (p);
| ^
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:532:1: warning: function dmalloc might be an allocator wrapper [-Wallocator-wrappers]
532 | dmalloc(size_t len)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:540:9: note: value obtained from allocator call is returned here
540 | return (p);
| ^
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:549:1: warning: function drealloc might be an allocator wrapper [-Wallocator-wrappers]
549 | drealloc(void *p, size_t len)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/test/utility/misc.c:557:9: note: value obtained from allocator call is returned here
557 | return (t);
| ^
3 warnings generated.
[24/270] Building C object src/utilities/CMakeFiles/wt.dir/util_misc.c.o
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:191:1: warning: function util_malloc might be an allocator wrapper [-Wallocator-wrappers]
191 | util_malloc(size_t len)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:196:5: note: value obtained from allocator call is returned here
196 | return (malloc(len));
| ^
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:206:1: warning: function util_calloc might be an allocator wrapper [-Wallocator-wrappers]
206 | util_calloc(size_t members, size_t sz)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:211:5: note: value obtained from allocator call is returned here
211 | return (calloc(members, sz));
| ^
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:221:1: warning: function util_realloc might be an allocator wrapper [-Wallocator-wrappers]
221 | util_realloc(void *p, size_t len)
| ^
/Users/haribabu.kommi/work/code/wiredtiger/src/utilities/util_misc.c:226:5: note: value obtained from allocator call is returned here
226 | return (realloc(p, len));
| ^
3 warnings generated.
Disable these warnings in the CMake configuration, as WiredTiger uses wrappers in the code.
- related to
-
WT-17012 Adopt clang type-aware memory allocation instead of suppressing compilation warnings
-
- Needs Scheduling
-