gcc -Werror -Wincompatible-function-pointer-types example.c -o example 由于foo 函数的参数类型是 int,而 func_ptr 指向的函数期望的参数类型是 double,因此这里会触发 -Wincompatible-function-pointer-types 警告。由于使用了 -Werror 选项,这个警告将被视为错误,编译将失败。 开发者需要修改代码以确保函数...
[-Werror,-Wincompatible-function-pointer-types] PubSub_SubscribeWindowStateChange(xfc->context.pubSub, xf_disp_OnWindowStateChange); ^~~~ /var/tmp/portage/net-misc/freerdp-2.9.0/work/freerdp-2.9.0/include/freerdp/event.h:39:2: note: passing argument to parameter 'EventHandler' here DEFINE...
[-Wincompatible-function-pointer-types] YGNodeSetMeasureFunc(self.yogaNode, RNDateTimePickerShadowViewMeasure); ^~~~ In module 'React' imported from /Users/expo/workingdir/build/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.h:1: In module 'yoga' imported from...