Commit 9e408e05 by Derek Mauro Committed by Copybara-Service

Cord: workaround a GCC 12.1 bug that triggers a spurious warning

See the GCC bug report
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585

and Abseil bug report
https://github.com/abseil/abseil-cpp/issues/1175

Fixes #1175

PiperOrigin-RevId: 450083136
Change-Id: I207aaffaec9166b335065dd6ef148a721b94048e
parent b8bbe92f
...@@ -632,7 +632,9 @@ inline const CordRepExternal* CordRep::external() const { ...@@ -632,7 +632,9 @@ inline const CordRepExternal* CordRep::external() const {
} }
inline CordRep* CordRep::Ref(CordRep* rep) { inline CordRep* CordRep::Ref(CordRep* rep) {
assert(rep != nullptr); // ABSL_ASSUME is a workaround for
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585
ABSL_ASSUME(rep != nullptr);
rep->refcount.Increment(); rep->refcount.Increment();
return rep; return rep;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment