ros2 / rosidl_typesupport

Packages which provide the typesupport for ROS messages and services
Apache License 2.0
13 stars 34 forks source link

Make sure to check typesupport handles against nullptr properly. #119

Closed clalancette closed 2 years ago

clalancette commented 2 years ago

clang has a false-positive warning where it can't figure out that ASSERT_TRUE(foo != nullptr) means that the rest of the test is safe to dereference foo. Switching to ASSERT_NE(foo, nullptr) fixes the issue, so do that here. This should get rid of a number of warnings when building under clang static analysis.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

clalancette commented 2 years ago

CI: