Added -Wzero-as-null-pointer-constant, replaced NULL --> UAVCAN_NULLPTR. All changes are automatic, no manual edits to the library code.

This commit is contained in:
Pavel Kirienko
2016-07-29 15:39:24 +03:00
parent b6fa34fed5
commit 38a241a90a
69 changed files with 306 additions and 274 deletions
+7 -1
View File
@@ -2,6 +2,12 @@
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#if __GNUC__
// We need auto_ptr for compatibility reasons
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
#include <string>
#include <cstdio>
#include <memory>
@@ -136,7 +142,7 @@ TEST(Multiset, Basic)
{
const std::string value = toString(i);
std::string* res = mset->emplace(value); // Will NOT override above
if (res == NULL)
if (res == UAVCAN_NULLPTR)
{
ASSERT_LT(2, i);
break;