Closed danhorner closed 2 years ago
Thanks for providing a fix for this.
However, the entire build should not be affected by a test case. I think the actual problem is that
int edge_case_tests()
{
...
}
should have been
int edge_case_tests(void)
{
...
}
Can you please check that, and update the PR accordingly if it works.
More specifically here, as reported by the error message:
test/json_test/test_json.c:142:20
Sure. Btw, I notice the flag is commented out on the gcc build with a note to similar effect, so you might find more of these as tests are added by gcc users:
Thanks.
The thing is, it is useful to have very strict compiler settings as long as they are reasonable because it ensures maximum portability. Otherwise there would be many more issues like the one you just reported because everyone has their policies and compiler versions.
Clang is generally fair. GCC assumes that you only use GCC and adapt to their conventions to a point where you either break code on other compilers, or make the code very ugly. That is why strict settings has to go on GCC and we rely on Clang to ensure the code remains relatively clean.
The build was failing on test functions missing prototypes.
Sample: