You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling on MacOS with GCC >= 11 will fail with error:
[ 23%] Building C object CMakeFiles/qjs.dir/quickjs.c.o
In file included from /Users/andrew/Git/quickjs-ng/quickjs.c:43:
In function 'js__malloc_usable_size',
inlined from 'js_def_malloc' at /Users/andrew/Git/quickjs-ng/quickjs.c:1706:51:
/Users/andrew/Git/quickjs-ng/cutils.h:488:12: error: 'ptr' may be used uninitialized [-Werror=maybe-uninitialized]
488 | return malloc_size(ptr);
This is because the js__malloc_usable_size function is defined using malloc_size on MacOS, which has signature:
Compiling on MacOS with GCC >= 11 will fail with error:
This is because the
js__malloc_usable_size
function is defined usingmalloc_size
on MacOS, which has signature:From GCC >=11,
-Wmaybe-uninitialised
has stricter warnings on inputs to a const-qualified parameter, which has caused issues already. You can see a small reprex of this behaviour on godboltI believe this is also the cause of the warnings seen by @barracuda156 in this comment/issue
The text was updated successfully, but these errors were encountered: