HomeFreeBSD

devel/electron29: fix build error regarding alloca in sqlite

Description

devel/electron29: fix build error regarding alloca in sqlite

The error was:
In file included from ../../third_party/sqlite/sqlite3_shim.c:16:
../../third_party/sqlite/src/amalgamation/sqlite3.c:53602:21: warning: call to undeclared function 'alloca'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
53602 | u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));

|                     ^

../../third_party/sqlite/src/amalgamation/sqlite3.c:20531:38: note: expanded from macro 'sqlite3StackAllocRaw'
20531 | # define sqlite3StackAllocRaw(D,N) alloca(N)

|                                      ^

../../third_party/sqlite/src/amalgamation/sqlite3.c:53602:10: error: incompatible integer to pointer conversion initializing 'u32 *' (aka 'unsigned int *') with an expression of type 'int' [-Wint-conversion]
53602 | u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));

|          ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PR: 279802
Reported by: Naram Qashat <cyberbotx@cyberbotx.com>
Obtained from: https://cgit.freebsd.org/ports/commit/?id=4ba66b974729b45f6c2418d87d7403ef2e7b474d

Details

Provenance
tagattieAuthored on Jun 22 2024, 11:09 PM
Parents
R11:044c1da998cd: devel/libexplain: fix build with llvm15+ from base
Branches
Unknown
Tags
Unknown