I’m getting a strange compile warning. It’s intermittent, and doesn’t appear every build. I get the warning “initialization makes pointer from integer without a cast” for the following line:
callbackTable *callbacks = generateLoggingCallback();
and, for completeness, this gives the same outcome
callbackTable *callbacks;
callbacks = generateLoggingCallback();
the function prototype for that is:
callbackTable *generateLoggingCallback();
and the implementation is
callbackTable *generateLoggingCallback() { ... }
So, I’m not quite sure what the problem is. Ideas?
If it’s pure C, isn’t there a warning about ‘unknown’ function? if yes, then the compiler decides that the unknown function returns int, and continues on.. check if proper headers are included, and the function is declared before it’s used.