Closed guillaumechereau closed 3 years ago
Unfortunately, empty braces are not really a valid C variable initializer, not even in C99. Many compilers support it as an extension because it has been added into C++, but not all of them.
I see... Actually the suggested fix by clang is to use { {} }
. Would that work?
Oops, a race condition. No {}
would work, even when nested. AFAIK, in a pedantic C, it can only express an empty code block, not a variable initializer.
But it should already be fixed in 70d0ef7.
Thanks! Perfect. I directly compile md4c source alongside my code, so it's nice that it compiles with -Wall by default.
Can be easily fixed by replacing
{0}
with{}
as suggested by clang: