]> granicus.if.org Git - clang/commitdiff
Silence 'set but not used' warning when building in release mode using gcc.
authorAndy Gibbs <andyg1001@hotmail.co.uk>
Wed, 19 Jun 2013 13:33:37 +0000 (13:33 +0000)
committerAndy Gibbs <andyg1001@hotmail.co.uk>
Wed, 19 Jun 2013 13:33:37 +0000 (13:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184299 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaCast.cpp

index 3b01c22867ac127a0bb00e4e802a79756c01b739..dff06b7f0a24f9af1bec0c50811e653b2b8934b4 100644 (file)
@@ -759,6 +759,7 @@ static void DiagnoseReinterpretUpDownCast(Sema &Self, const Expr *SrcExpr,
     VirtualBase = VirtualBase && IsVirtual;
   }
 
+  (void) NonZeroOffset; // Silence set but not used warning.
   assert((VirtualBase || NonZeroOffset) &&
          "Should have returned if has non-virtual base with zero offset");