From f99d3df9c053f57c522a0e8bc89fdd381311073c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 7 Mar 2018 14:57:08 +0100 Subject: [PATCH] Fix harmless gcc -Wconversion-null warning in menu unit test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't compare with NULL inside CPPUNIT_ASSERT() to avoid warning: passing NULL to non-pointer argument 1 of ‘Catch::BinaryExpression Catch::ExpressionLhs::operator==(const RhsT&) [with RhsT = long int, T = wxMenuItem* const&]’ [-Wconversion-null] gcc warning. --- tests/menu/menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/menu/menu.cpp b/tests/menu/menu.cpp index d7c26f3260..bf700ec508 100644 --- a/tests/menu/menu.cpp +++ b/tests/menu/menu.cpp @@ -254,7 +254,7 @@ void MenuTestCase::FindInMenu() // Find by id: CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Bar) ); - CPPUNIT_ASSERT( menuHelp->FindItem(MenuTestCase_Foo) == NULL ); + CPPUNIT_ASSERT( !menuHelp->FindItem(MenuTestCase_Foo) ); for (n=0; n < menuHelp->GetMenuItemCount(); ++n) {