From 7f0bbb47ef2c8afb0cbe015438d8f2c4459ab7c0 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Sat, 28 Apr 2018 13:54:35 +0100 Subject: Disable false-positive clang warning Test-Information: ./scons check=1 allow_warnings=0 now passes on latest macOS Change-Id: I4411d6b4953e6e2eb7fbb53e460fef296d24b0e6 diff --git a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp index 3777ba6..5339c7b 100644 --- a/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp +++ b/Swift/Controllers/Chat/UnitTest/MUCControllerTest.cpp @@ -47,6 +47,9 @@ #include <Swift/Controllers/UnitTest/MockChatWindow.h> #include <Swift/Controllers/XMPPEvents/EventController.h> +// Clang wrongly things that tests for 0 are using 0 as null. +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" + using namespace Swift; class MUCControllerTest : public ::testing::Test { diff --git a/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp b/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp index efd37d9..b6c909a 100644 --- a/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp +++ b/Swiften/Chat/UnitTest/ChatStateNotifierTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2016 Isode Limited. + * Copyright (c) 2010-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -13,6 +13,9 @@ #include <Swiften/Disco/DummyEntityCapsProvider.h> #include <Swiften/Network/DummyTimerFactory.h> +// Clang wrongly things that tests for 0 are using 0 as null. +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" + using namespace Swift; class ChatStateNotifierTest : public ::testing::Test { diff --git a/Swiften/Client/UnitTest/XMLBeautifierTest.cpp b/Swiften/Client/UnitTest/XMLBeautifierTest.cpp index 2eac086..2a639ea 100644 --- a/Swiften/Client/UnitTest/XMLBeautifierTest.cpp +++ b/Swiften/Client/UnitTest/XMLBeautifierTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2017 Isode Limited. + * Copyright (c) 2010-2018 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -8,6 +8,9 @@ #include <Swiften/Client/XMLBeautifier.h> #include <iostream> +// Clang wrongly things that tests for 0 are using 0 as null. +#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" + using namespace Swift; namespace { -- cgit v0.10.2-6-g49f6