Open Bug 1796623 Opened 3 years ago Updated 4 months ago

Investigate Chrome's compile options for dealing with -Wcomma warning we see in third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view.h

Categories

(Core :: WebRTC, task)

task

Tracking

()

People

(Reporter: mjf, Unassigned)

References

Details

We see warnings on statements that look like:

return ABSL_HARDENING_ASSERT(i < size()), ptr_[i];

There are other forms of this issue that generate the same type of warning. In all cases, the warning looks like:

0:55.29 /Users/mfroman/no_tm_backup/elm/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view.h:614:50: warning: possible misuse of comma operator here [-Wcomma]
0:55.29     return ABSL_HARDENING_ASSERT(len <= kMaxSize), len;
0:55.29                                                  ^
0:55.29 /Users/mfroman/no_tm_backup/elm/third_party/libwebrtc/third_party/abseil-cpp/absl/strings/string_view.h:614:12: note: cast expression to void to silence warning
0:55.29     return ABSL_HARDENING_ASSERT(len <= kMaxSize), len;
0:55.29            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0:55.29            static_cast<void>(                    )
0:55.29 /Users/mfroman/no_tm_backup/elm/third_party/libwebrtc/third_party/abseil-cpp/absl/base/macros.h:134:37: note: expanded from macro 'ABSL_HARDENING_ASSERT'
0:55.29 #define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr)
0:55.29                                     ^~~~~~~~~~~~~~~~~
0:55.29 /Users/mfroman/no_tm_backup/elm/third_party/libwebrtc/third_party/abseil-cpp/absl/base/macros.h:98:3: note: expanded from macro 'ABSL_ASSERT'
0:55.29   (ABSL_PREDICT_TRUE((expr)) ? static_cast<void>(0) \
0:55.29   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We've temporarily worked around this issue by turning off that warning in string_view.h in
https://phabricator.services.mozilla.com/D159742

See Also: → 1965053
You need to log in before you can comment on or make changes to this bug.