Skip to content

Warnings compiling with bazel on macOS #493

@jmr

Description

@jmr
% bazel test ...

s2/util/math/exactfloat/exactfloat_test.cc:109:8: warning: unused function 'scalbn' [-Wunused-function]
double scalbn(double a, int exp) {
       ^
s2/util/math/exactfloat/exactfloat_test.cc:113:8: warning: unused function 'scalbln' [-Wunused-function]
double scalbln(double a, long exp) {
       ^
2 warnings generated.
INFO: From Compiling s2/s2closest_edge_query_test.cc:
s2/s2closest_edge_query_test.cc:342:9: warning: unused type alias 'Result' [-Wunused-local-typedef]
  using Result = S2ClosestEdgeQuery::Result;
        ^
1 warning generated.
INFO: From Compiling s2/s2shapeutil_coding_test.cc:
s2/s2shapeutil_coding_test.cc:62:30: warning: 'FullDecodeShapeFactory' is deprecated: Use version that accepts S2Error to detect encoding errors [-Wdeprecated-declarations]
      &decoder, s2shapeutil::FullDecodeShapeFactory(&decoder)));
                             ^
./s2/s2shapeutil_coding.h:181:3: note: 'FullDecodeShapeFactory' has been explicitly marked deprecated here
[[deprecated("Use version that accepts S2Error to detect encoding errors")]]
  ^
s2/s2shapeutil_coding_test.cc:74:24: warning: 'HexStringToBytes' is deprecated: Use the HexStringToBytes() that returns a bool [-Wdeprecated-declarations]
  string bytes = absl::HexStringToBytes(
                       ^
external/abseil-cpp~/absl/strings/escaping.h:173:1: note: 'HexStringToBytes' has been explicitly marked deprecated here
ABSL_DEPRECATED("Use the HexStringToBytes() that returns a bool")
^
external/abseil-cpp~/absl/base/attributes.h:689:49: note: expanded from macro 'ABSL_DEPRECATED'
#define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
                                                ^
s2/s2shapeutil_coding_test.cc:92:30: warning: 'FullDecodeShapeFactory' is deprecated: Use version that accepts S2Error to detect encoding errors [-Wdeprecated-declarations]
      &decoder, s2shapeutil::FullDecodeShapeFactory(&decoder)));
                             ^
./s2/s2shapeutil_coding.h:181:3: note: 'FullDecodeShapeFactory' has been explicitly marked deprecated here
[[deprecated("Use version that accepts S2Error to detect encoding errors")]]
  ^
3 warnings generated.
INFO: From Compiling s2/s2lax_polygon_shape_test.cc:
s2/s2lax_polygon_shape_test.cc:350:19: warning: loop variable '[e, i, j]' creates a copy from type 'std::tuple<int, int, int> const' [-Wrange-loop-construct]
  for (const auto [e, i, j] : edges) {
                  ^
s2/s2lax_polygon_shape_test.cc:350:8: note: use reference type 'std::tuple<int, int, int> const &' to prevent copying
  for (const auto [e, i, j] : edges) {
       ^~~~~~~~~~~~~~~~~~~~~~
                  &
1 warning generated.
INFO: From Compiling s2/encoded_s2shape_index_test.cc:
s2/encoded_s2shape_index_test.cc:330:44: warning: 'LazyDecodeShapeFactory' is deprecated: Use version that accepts S2Error to detect encoding errors [-Wdeprecated-declarations]
        index_.Init(&decoder, s2shapeutil::LazyDecodeShapeFactory(&decoder)));
                                           ^
./s2/s2shapeutil_coding.h:188:3: note: 'LazyDecodeShapeFactory' has been explicitly marked deprecated here
[[deprecated("Use version that accepts S2Error to detect encoding errors")]]
  ^
s2/encoded_s2shape_index_test.cc:375:24: warning: 'HexStringToBytes' is deprecated: Use the HexStringToBytes() that returns a bool [-Wdeprecated-declarations]
  string bytes = absl::HexStringToBytes(
                       ^
external/abseil-cpp~/absl/strings/escaping.h:173:1: note: 'HexStringToBytes' has been explicitly marked deprecated here
ABSL_DEPRECATED("Use the HexStringToBytes() that returns a bool")
^
external/abseil-cpp~/absl/base/attributes.h:689:49: note: expanded from macro 'ABSL_DEPRECATED'
#define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
                                                ^
s2/encoded_s2shape_index_test.cc:381:42: warning: 'FullDecodeShapeFactory' is deprecated: Use version that accepts S2Error to detect encoding errors [-Wdeprecated-declarations]
      actual.Init(&decoder, s2shapeutil::FullDecodeShapeFactory(&decoder)));
                                         ^
./s2/s2shapeutil_coding.h:181:3: note: 'FullDecodeShapeFactory' has been explicitly marked deprecated here
[[deprecated("Use version that accepts S2Error to detect encoding errors")]]
  ^
3 warnings generated.
INFO: From Compiling s2/mutable_s2shape_index_test.cc:
s2/mutable_s2shape_index_test.cc:817:47: warning: 'FullDecodeShapeFactory' is deprecated: Use version that accepts S2Error to detect encoding errors [-Wdeprecated-declarations]
  bool ok = index.Init(&decoder, s2shapeutil::FullDecodeShapeFactory(&decoder));
                                              ^
./s2/s2shapeutil_coding.h:181:3: note: 'FullDecodeShapeFactory' has been explicitly marked deprecated here
[[deprecated("Use version that accepts S2Error to detect encoding errors")]]
  ^
1 warning generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions