warn

"defined but not used"

gcc 编译有"defined but not used" 警告,那么在 CPPFLAGS 这边进行修改:

WARNFLAGS = -Wall -Wno-unused-function
CPPFLAGS =-std=c++11  $(WARNFLAGS) ...

参考: https://blog.csdn.net/qq_28584889/article/details/97764810
https://cloud.tencent.com/developer/ask/119165

error: this ‘if’ clause does not guard... [-Werror=misleading-indentation], misleadingly indented as if it were guarded by” an if?

这个是 if 代码下面的缩进有些问题,只要检查缩进就行。有可能是多缩进了,也有可能是空格和 tab 混合使用。

参考: https://stackoverflow.com/questions/50318900/why-is-gcc-warning-me-this-line-is-misleadingly-indented-as-if-it-were-guarded
https://blog.csdn.net/lun55423/article/details/115530114

标签: build

添加新评论