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
test/tokeniser2.c: In function ‘token_handler’:
test/tokeniser2.c:444:46: error: ‘t.data.character.ptr’ may be used
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
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
relevant bug entry and complete bug logs:
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!