warning: function declaration isn’t a prototype的解决方法



今天写内核态程序遇见个问题,在一个很简单的函数上编译时提示了这个警告

warning: function declaration isn’t a prototype

百度了下,有人说是参数传参的问题,在内核态不应该是空的,应该加上void

int flashid_check()

改为

int flashid_check(void)

这样就可以解决了!

看样子内核态程序要比应用态严格很多啊!

你可能感兴趣的:(warning: function declaration isn’t a prototype的解决方法)