mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:53:33 +08:00
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:
@@ -5,6 +5,7 @@
|
||||
#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>
|
||||
@@ -139,7 +140,7 @@ TEST(Map, Basic)
|
||||
const std::string key = toString(i);
|
||||
const std::string value = toString(i);
|
||||
std::string* res = map->insert(key, value); // Will override some from the above
|
||||
if (res == NULL)
|
||||
if (res == UAVCAN_NULLPTR)
|
||||
{
|
||||
ASSERT_LT(2, i);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user