You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clang -v
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
What is the expected behavior?
no compile warning
What is the actual behavior?
a lot of enum-compare-switch warning
$ ninja
[1/2] Building CXX object exporters/otlp/CMakeFiles/opentelemetry_exporter_otlp_grpc_client.dir/src/otlp_grpc_utils.cc.o
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:53:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_DATA_LOSS:
^~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:51:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_UNAVAILABLE:
^~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:49:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_INTERNAL:
^~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:47:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_UNIMPLEMENTED:
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:45:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_OUT_OF_RANGE:
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:43:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_ABORTED:
^~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:41:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_FAILED_PRECONDITION:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:39:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_RESOURCE_EXHAUSTED:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:37:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_UNAUTHENTICATED:
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:35:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_PERMISSION_DENIED:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:33:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_ALREADY_EXISTS:
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:31:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_NOT_FOUND:
^~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:29:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_DEADLINE_EXCEEDED:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:27:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_INVALID_ARGUMENT:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:25:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_UNKNOWN:
^~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:23:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_CANCELLED:
^~~~~~~~~~~~~~~~~~~~~
/Users/flier/github/opentelemetry-cpp/exporters/otlp/src/otlp_grpc_utils.cc:21:10: warning: comparison of different enumeration types in switch statement ('::grpc::StatusCode' and 'grpc_status_code') [-Wenum-compare-switch]
case GRPC_STATUS_OK:
^~~~~~~~~~~~~~
17 warnings generated.
[2/2] Linking CXX static library exporters/otlp/libopentelemetry_exporter_otlp_grpc_client.a
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Build with clang-13 @ macosx
What is the expected behavior?
no compile warning
What is the actual behavior?
a lot of
enum-compare-switch
warningThe text was updated successfully, but these errors were encountered: