"error: ‘t.data.character.ptr’ may be used uninitialized " when building hubbub with gcc 11
by Andy Tai
Hi, I found from GNU Guix's build check that when building with gcc 11,
building hubbub would fail when building tests with errors like
COMPILE: test/tokeniser2.c
COMPILE: test/tokeniser3.c
COMPILE: test/tree.c
COMPILE: test/tree2.c
COMPILE: test/tree-buf.c
test/tokeniser2.c: In function ‘token_handler’:
test/tokeniser2.c:444:46: error: ‘t.data.character.ptr’ may be used
uninitialized [-Werror=maybe-uninitialized]
444 | t.data.character.ptr += len;
| ^~
test/tokeniser2.c:441:38: note: ‘t’ declared here
441 | hubbub_token t;
| ^
test/tokeniser2.c:445:46: error: ‘t.data.character.len’ may be used
uninitialized [-Werror=maybe-uninitialized]
445 | t.data.character.len -= len;
| ^~
...
I briefly took a look of the test source code in question and the
hubbub_token structs seem not explicitly initialized. Is this a real
warning from gcc of possibly uninitialized variable which can cause
the build to fail if allow warnings are treated as errors by gcc
during build (a common practice)? Thanks if maintainer can take a
look.
relevant bug entry and complete bug logs:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63526
1 week, 4 days
Portability patches to libcss libdom libutf8proc netsurf
by Delta V
Hello, as communicated on IRC, these attached patches replace
instances of int with int32_t where necessary to compile on platforms
where int32_t is actually long, alongside using the portable format
macros (e.g. PRIx32 where x or lx can't be hardcoded).
Tested by compiling on gcc 13.
Hope this helps, and let me know if I left any of my porting patches
in there instead of just correctness changes!
3 months, 2 weeks