Package: libgtest-dev
Version: 1.6.0-2
Severity: normal
Tags: upstream patch
Control: block 701243 by -1

Dear Maintainer,

googletest 1.6 and earlier has GEST_COMPILE_ASSERT_ that triggers
unused-local-typedef warnings with GCC 4.8.  These are fatal for all
users of -Werror e.g. aptitude.

Attached patch is part of an upstream commit and does allow aptitude
to build ok (after patching for aptitudes own issues).  Please apply.

Regards

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information
Descripton: avoid unused-local-typedef
Origin: http://code.google.com/p/googletest/source/detail?r=643

diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index f78994a..dc4fe0c 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -813,8 +813,8 @@ struct CompileAssert {
 };
 
 #define GTEST_COMPILE_ASSERT_(expr, msg) \
-  typedef ::testing::internal::CompileAssert<(bool(expr))> \
-      msg[bool(expr) ? 1 : -1]
+  typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
+      msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
 
 // Implementation details of GTEST_COMPILE_ASSERT_:
 //

Reply via email to