From 07b3a041b45f376ea182d8b4ade7b01bfaa9ab2c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 13 Apr 2010 23:34:11 +0000 Subject: [PATCH] Fix -Asserts warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101191 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/ImmutableSet.h | 2 ++ .../googletest/include/gtest/internal/gtest-linked_ptr.h | 1 + 2 files changed, 3 insertions(+) diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 65e70e279ab..70c3caf2a06 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -189,6 +189,8 @@ public: unsigned verify() const { unsigned HL = getLeft() ? getLeft()->verify() : 0; unsigned HR = getRight() ? getRight()->verify() : 0; + (void) HL; + (void) HR; assert(getHeight() == ( HL > HR ? HL : HR ) + 1 && "Height calculation wrong"); diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h b/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h index f98af0b123b..d4c7a39b0ec 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h @@ -176,6 +176,7 @@ class linked_ptr { // Sole ownership by this linked_ptr object is required. T* release() { bool last = link_.depart(); + (void) last; assert(last); T* v = value_; value_ = NULL;