Closed fweimer-rh closed 7 months ago
Future compilers will reject the current initializer:
io.c:1002:7: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast 1002 | { NULL, 0, NULL }, | ^~~~ io.c:1002:16: error: initialization of ‘char’ from ‘void *’ makes integer from pointer without a cast 1002 | { NULL, 0, NULL }, | ^~~~ io.c:996:26: warning: missing braces around initializer [-Wmissing-braces] 996 | static BOM BOM_codes[] = { | ^ io.c:996:26: warning: missing braces around initializer [-Wmissing-braces]
The reason is that NULL is usually a pointer constant, which is not a valid expression for a character.
Related to:
I also suffer from the same compilation errors, with clang compiler in Apple M1 CPU... And I agree that this is the right solution.
Future compilers will reject the current initializer:
The reason is that NULL is usually a pointer constant, which is not a valid expression for a character.
Related to: