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
{{ message }}
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
When Android NDK compiles char_ref.c with -DNDEBUG -Wall, we see warnings:
char_ref.rl: In function 'consume_named_ref':
char_ref.rl:2498:12: warning: unused variable 'matched' [-Wunused-variable]
char_ref.rl:2512:12: warning: unused variable 'matched' [-Wunused-variable]
More warnings are triggered by -Wall -Wextra:
utf8.c:88:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration]
uint32_t static inline decode(uint32_t* state, uint32_t* codep, uint32_t byte) {
^
utf8.c:88:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
Another set of warnings (49) is triggered by -Wunused-variable, which is turned on by default with Clang-Wextra, e.g.:
error.c: In function 'find_next_newline':
error.c:150:17: warning: unused parameter 'original_text' [-Wunused-parameter]
Possible workarounds:
These unused-variable warnings could be addressed by #348, but the pull request has not been merged yet.
With GCC toolchain, I can hide all these warnings with LOCAL_CFLAGS=-Wno-unused-variable -Wno-unused-parameter -Wno-old-style-declaration for the gumbo-parser library, but not for Clang, which has been declared the only supported compiler in NDK 14.
The best fix for unused-variable and unused-parameter would be to add __attribute__ ((unused)) in relevant positions in source code.
Regarding utf8.c, the fix is simply to shuffle the keywords:
When Android NDK compiles char_ref.c with
-DNDEBUG -Wall
, we see warnings:More warnings are triggered by
-Wall -Wextra
:Another set of warnings (49) is triggered by
-Wunused-variable
, which is turned on by default with Clang-Wextra
, e.g.:Possible workarounds:
These unused-variable warnings could be addressed by #348, but the pull request has not been merged yet.
With GCC toolchain, I can hide all these warnings with
LOCAL_CFLAGS=-Wno-unused-variable -Wno-unused-parameter -Wno-old-style-declaration
for the gumbo-parser library, but not for Clang, which has been declared the only supported compiler in NDK 14.The best fix for unused-variable and unused-parameter would be to add
__attribute__ ((unused))
in relevant positions in source code.Regarding utf8.c, the fix is simply to shuffle the keywords:
The text was updated successfully, but these errors were encountered: