• Eric Pouech's avatar
    jscript: Fix GCC 12.2 warning. · 4bdf92cb
    Eric Pouech authored
    When initializing a jsstr_inline_t with a len < 3, the size passed
    for the allocation is smaller then the size of the structure
    (as the later is rounded up to the alignment = 4 bytes).
    
    GCC 12.2 complains about this when dereferencing the pointer to
    the structure as the size passed for allocation is smaller than the
    size of the structure.
    
    The warning is fixed by using flexible array member in
    jsstr_inline_t. Given the rounding behavior in memory allocation, this
    should not change the size of allocated blocks.
    Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
    4bdf92cb
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...