zoukankan      html  css  js  c++  java
  • 报错解决:error: this statement may fall through [-Werror=implicit-fallthrough=]

    下午在编译 grpc时报错如下:
    utilities/blob_db/blob_log_reader.cc:74:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    next_byte_ += kb_size;
    ~~~~~~~~~~~^~~~~~~~~~
    utilities/blob_db/blob_log_reader.cc:76:5: note: here
    case kReadHeaderKey:
    ^~~~
    utilities/blob_db/blob_log_reader.cc:94:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
    next_byte_ += record->GetBlobSize();
    ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
    utilities/blob_db/blob_log_reader.cc:96:5: note: here
    case kReadHeaderKeyBlob:
    ^~~~
    cc1plus: all warnings being treated as errors
    Makefile:1813: recipe for target 'utilities/blob_db/blob_log_reader.o' failed
    make: *** [utilities/blob_db/blob_log_reader.o] Error 1
    make: *** Waiting for unfinished jobs....
    CMake Warning at CMakeLists.txt:122 (message):
    gRPC_INSTALL will be forced to FALSE because gRPC_ZLIB_PROVIDER is "module"


    CMake Error at third_party/boringssl/CMakeLists.txt:30 (message):
    Could not find Go


    -- Configuring incomplete, errors occurred!
    See also "/home/zhang/paxosstore/certain/third/grpc/CMakeFiles/CMakeOutput.log".
    See also "/home/zhang/paxosstore/certain/third/grpc/CMakeFiles/CMakeError.log".
    [MAKE] Generating cache.mk
    [AR] Creating /home/zhang/paxosstore/certain/third/grpc/libs/opt/libgpr.a
    [C] Compiling third_party/boringssl/crypto/bio/fd.c
    [C] Compiling third_party/boringssl/crypto/bio/file.c
    [C] Compiling third_party/boringssl/crypto/bn/add.c
    [C] Compiling third_party/boringssl/crypto/bn/asm/x86_64-gcc.c
    third_party/boringssl/crypto/bio/file.c: In function ‘file_ctrl’:
    third_party/boringssl/crypto/bio/file.c:186:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
    num = 0;
    ~~~~^~~
    third_party/boringssl/crypto/bio/file.c:187:5: note: here
    case BIO_C_FILE_SEEK:
    ^~~~
    third_party/boringssl/crypto/bio/fd.c: In function ‘fd_ctrl’:
    third_party/boringssl/crypto/bio/fd.c:192:11: error: this statement may fall through [-Werror=implicit-fallthrough=]
    num = 0;
    ~~~~^~~
    third_party/boringssl/crypto/bio/fd.c:193:5: note: here
    case BIO_C_FILE_SEEK:

    1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
    解决方法如下:
    make CFLAGS='-Wno-implicit-fallthrough'

  • 相关阅读:
    舍不得花钱的心理分析
    DLL编程的导入导出,__declspec(dllimport),__declspec(dllexport)
    浅谈C/C++内存泄漏及其检测工具
    C++多线程编程简单实例
    linux镜像源设置
    Linux基础教程 linux无密码ssh登录设置
    兄弟连教育分享:用CSS实现鼠标悬停提示的方法
    PHP基础教程 PHP的页面缓冲处理机制
    Linux基础教程 linux下cat 命令使用详解
    PHP基础教程 php 网络上关于设计模式一些总结
  • 原文地址:https://www.cnblogs.com/surplus/p/12634748.html
Copyright © 2011-2022 走看看