【已解决】error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]

问题描述

google/protobuf/unittest_lite.pb.cc:8544:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
     if (!_extensions_.IsInitialized()) return false;  return true;
     ^~

解决方案

打开相关文件,将

if (!_extensions_.IsInitialized()) return false;  return true;

修改为

return _extensions_.IsInitialized();

重新make check

备注」由于*pb.cc文件是protobuf编译过程中自动生成的,故修改方法“治标不治本”。请检查protobuf版本是否匹配。

参考:https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835266

猜你喜欢

转载自blog.csdn.net/lun55423/article/details/115530114
今日推荐