siginfo_t *, void *)’ to‘void (*)(int)’ [-Wcast-function-type] 292 | if ((signum == SIGHUP || signum == SIGPIPE) && (old_action_p->sa_handler != SIG_DFL || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) { | ^ ...
虽然完全抑制警告有时是有用的,但通常最好在代码级别解决这个问题。这里的问题是您的声明是错误的,这...
conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ echo 'int main(){return 0;}' > test.c $ gcc -Wcast-function-type test.c gcc: error: unrecognized command line option ‘-Wcast-function-type’ $ gcc -Wno-cast-function-type test.c ...
(Thread *, Zone *, NativeArguments *)') to 'Dart_NativeFunction' (aka 'void (*)(_Dart_NativeArguments *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] 84 | if (reinterpret_cast<Dart_NativeFunction>(entry->function_) == nf) { | ^~~~ 2 errors ...