-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gtest cause warnings under gcc 4.5.1 #322
Comments
Original comment by
|
Original comment by |
Original comment by |
Original comment by |
gromacs-upload
pushed a commit
to gromacs/gromacs
that referenced
this issue
Jan 5, 2016
gcc 4.7.3 has a bug that means it warns about converting false to a pointer type (see google/googletest#322), so we should just use the normal approach in GoogleTest and avoid problems. Change-Id: Ic700ded4a645af1e45fc66fde8fffae692ce33ec
Merged
yyang-even
pushed a commit
to yyang-even/algorithms
that referenced
this issue
Oct 17, 2016
Use a integer boolean instead of c++ boolean. Following warning is silenced: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ Also see: google/googletest#322 Change-Id: I152d0b2727f8cae1c798eb14315cedb8ff760250
jfirebaugh
added a commit
to mapbox/mapbox-gl-native
that referenced
this issue
Jan 11, 2017
jfirebaugh
added a commit
to mapbox/mapbox-gl-native
that referenced
this issue
Jan 11, 2017
facebook-github-bot
pushed a commit
to facebook/rocksdb
that referenced
this issue
Mar 9, 2017
Summary: lately it fails on travis due to a compiler bug (see google/googletest#322 (comment)). interestingly it seems to affect occurrences of `ASSERT_EQ(false, ...);` but not `ASSERT_EQ(true, ...);`. Closes #1958 Differential Revision: D4680742 Pulled By: ajkr fbshipit-source-id: 291fe41
dumganhar
pushed a commit
to dumganhar/chromium
that referenced
this issue
Mar 14, 2017
EXPECT_EQ(false, _) is known to hit a GCC error, EXPECT_FALSE(_) is safer and direct: google/googletest#322 (comment). It is causing compilation failure on the unittest inside simplechrome for some boards. Well, probably nobody expect me may be doing that, but I still think it is nicer to keep it compiling, as long as it can be done in a simple change. BUG=none TEST=`ninja chromeos_unittests` in simplechrome environment. Review-Url: https://codereview.chromium.org/2748013002 Cr-Commit-Position: refs/heads/master@{#456624}
ligfx
added a commit
to ligfx/dolphin
that referenced
this issue
Mar 25, 2017
Using `EXPECT_EQ` with boolean literals can cause a warning in certain versions of GCC. See google/googletest#322 Fixes warnings: ``` ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_Basics_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:15:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_BitGetSet_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringBeginsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:23:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:25:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:26:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringEndsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:35:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:37:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:38:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:39:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] c ```
ligfx
added a commit
to ligfx/dolphin
that referenced
this issue
Mar 25, 2017
Using `EXPECT_EQ` with boolean literals can cause a warning in certain versions of GCC. See google/googletest#322 Fixes warnings: ``` ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_Basics_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:15:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_BitGetSet_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringBeginsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:23:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:25:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:26:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringEndsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:35:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:37:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:38:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:39:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] c ```
mahdihijazi
pushed a commit
to mahdihijazi/dolphin
that referenced
this issue
Apr 27, 2017
Using `EXPECT_EQ` with boolean literals can cause a warning in certain versions of GCC. See google/googletest#322 Fixes warnings: ``` ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_Basics_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:15:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/BitSetTest.cpp: In member function 'virtual void BitSet_BitGetSet_Test::TestBody()': ../Source/UnitTests/Common/BitSetTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringBeginsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:23:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:25:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:26:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:27:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp: In member function 'virtual void StringUtil_StringEndsWith_Test::TestBody()': ../Source/UnitTests/Common/StringUtilTest.cpp:35:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:37:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:38:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] ../Source/UnitTests/Common/StringUtilTest.cpp:39:165: error: converting 'false' to pointer type for argument 1 of 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)' [-Werror=conversion-null] c ```
edwardstock
added a commit
to edwardstock/toolbox
that referenced
this issue
Dec 10, 2017
rip-nsk
added a commit
to rip-nsk/orc
that referenced
this issue
Dec 12, 2017
asfgit
pushed a commit
to apache/orc
that referenced
this issue
Dec 13, 2017
Fixes #200 Includes: * include adaptor to avoid using noexcept if it is not available. * workaround bug in gcc google/googletest#322 Signed-off-by: Owen O'Malley <omalley@apache.org>
luebbers
added a commit
to OFS/opae-sdk
that referenced
this issue
Mar 30, 2018
luebbers
added a commit
to OFS/opae-sdk
that referenced
this issue
Apr 17, 2018
yappy
added a commit
to yappy/DollsKit
that referenced
this issue
Dec 25, 2018
gcc のバグ clang でも起きているのは謎 (同じバグを持っていた?) google/googletest#322
wooksong
added a commit
to wooksong/nnstreamer
that referenced
this issue
Sep 18, 2019
A GCC bug [1] might cause warnings related to 'conversion-null' when using googletest macros with !FALSE as arguments. Therefore, in the case that Werror is true, the build would be broken by this bug. To avoid such situation, this patch replaces EXPECT_EQs in the plugin unit tests with EXPECT_TRUE or EXPECT_FALSE. [1] google/googletest#322 Signed-off-by: Wook Song <wook16.song@samsung.com>
wooksong
added a commit
to wooksong/nnstreamer
that referenced
this issue
Sep 19, 2019
A GCC bug [1] might cause warnings related to 'conversion-null' when using googletest macros with !FALSE as arguments. Therefore, in the case that Werror is true, the build would be broken by this bug. To avoid such situation, this patch replaces EXPECT_EQs in the plugin unit tests with EXPECT_TRUE or EXPECT_FALSE. [1] google/googletest#322 Signed-off-by: Wook Song <wook16.song@samsung.com>
wooksong
added a commit
to wooksong/nnstreamer
that referenced
this issue
Sep 19, 2019
A GCC bug [1] might cause warnings related to 'conversion-null' when using googletest macros with !FALSE as arguments. Therefore, in the case that Werror is true, the build would be broken by this bug. To avoid such situation, this patch replaces EXPECT_EQs in the plugin unit tests with EXPECT_TRUE or EXPECT_FALSE. [1] google/googletest#322 Signed-off-by: Wook Song <wook16.song@samsung.com>
myungjoo
pushed a commit
to nnstreamer/nnstreamer
that referenced
this issue
Sep 19, 2019
A GCC bug [1] might cause warnings related to 'conversion-null' when using googletest macros with !FALSE as arguments. Therefore, in the case that Werror is true, the build would be broken by this bug. To avoid such situation, this patch replaces EXPECT_EQs in the plugin unit tests with EXPECT_TRUE or EXPECT_FALSE. [1] google/googletest#322 Signed-off-by: Wook Song <wook16.song@samsung.com>
oran-osc-github
pushed a commit
to o-ran-sc/ric-plt-sdl
that referenced
this issue
Nov 19, 2019
Certain gcc versions will give (per my understanding false positive) warning when 'EXPECT_EQ' macro is used so that other argument is 'true' or 'false'. For example, Ubuntu 16.04 has by default such a gcc version. See some related discussion below: google/googletest#322 We have defined all compiler warning to be treated as errors, thus above issue will lead to compilation error. Simple fix is to use 'EXPECT_TRUE' or 'EXPECT_FALSE' instead. Those are more readable, and thus better choice anyway. Signed-off-by: Rolf Badorek <rolf.badorek@nokia.com> Change-Id: Ib0f3841c1b6fe2cf95eac3e4dc0cbcba9c3c8268
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original issue reported on code.google.com by
chen3feng
on 13 Oct 2010 at 1:57The text was updated successfully, but these errors were encountered: