warning: control reaches end of non-void function

Posted dxmcu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了warning: control reaches end of non-void function相关的知识,希望对你有一定的参考价值。

用gcc编译一个程序的时候出现这样的警告:

warning: control reaches end of non-void function

它的意思是:控制到达非void函数的结尾。就是说你的一些本应带有返回值的函数到达结尾后可能并没有返回任何值。这时候,最好检查一下是否每个控制流都会有返回值。

以上是关于warning: control reaches end of non-void function的主要内容,如果未能解决你的问题,请参考以下文章

php-fpm: 某项目网站频繁出现503问题解决( WARNING: [pool www] server reached pm.max_children setting (50), consider

error:control reaches end of non-void function [-Werror=return-type]

server reached pm.max_children setting , consider raising it

XCode warning:“View Controller” is unreachable because it has no entry points

*WARNING* LSF has been configured to use Linux control groups; however, the Cadence daemon starter

*WARNING* LSF has been configured to use Linux control groups; however, the Cadence daemon starter