Disable deprecation warnings

Internally, we rely on clang-tidy to warn about using deprecated declarations.
And for using deprecated declarations within SAPI itself, we should not warn.

Drive-by:
- Fix warning in `mounts_test.cc`
PiperOrigin-RevId: 443634512
Change-Id: I7ef66f0ba77201026490baab07766510c1c55c6a
This commit is contained in:
Christian Blichmann 2022-04-22 04:57:24 -07:00 committed by Copybara-Service
parent 28d6122d6b
commit ff9009458c
2 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
"""General build definitions useful for the whole project."""
_SAPI_LINUX_COPTS = [
"-Wno-deprecated-declarations",
"-Wno-narrowing",
"-Wno-sign-compare",
]

View File

@ -267,7 +267,7 @@ TEST(MountTreeTest, TestNodeEquivalence) {
MountTree::RootNode* rn1 = nodes[7].mutable_root_node();
rn1->set_writable(true);
for (const MountTree::Node n : nodes) {
for (const MountTree::Node& n : nodes) {
ASSERT_TRUE(n.IsInitialized());
}
// Compare same file nodes