Suppress -Wunused-but-set-variable on variable (#4777)

sentinel_count is not used in non-assert builds.

Recent clang improvements to -Wunused-but-set-variable trigger a warning on this.

Fixes #4772.
This commit is contained in:
Nico Weber 2022-04-01 12:07:05 -04:00 committed by GitHub
parent 5760114d77
commit b0ce31fd2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -348,6 +348,7 @@ void IntrusiveList<NodeType>::Check(NodeType* start) {
p = p->next_node_;
} while (p != start);
assert(sentinel_count == 1 && "List should have exactly 1 sentinel node.");
(void)sentinel_count;
p = start;
do {