Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence one more gcc false-positive. #814

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
#include <gtest/gtest.h>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

#include <algorithm>
#include <array>
Expand Down Expand Up @@ -478,15 +486,7 @@ TEST(Test_messages, constants_assign) {
// Defaults
TEST(Test_messages, defaults) {
rosidl_generator_tests::msg::Defaults message;
// workaround for https://github.com/google/googletest/issues/322
#ifdef __linux__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion-null"
#endif
TEST_BASIC_TYPE_FIELD_ASSIGNMENT(message, bool_value, true, false);
#ifdef __linux__
#pragma GCC diagnostic pop
#endif
TEST_BASIC_TYPE_FIELD_ASSIGNMENT(message, byte_value, 50, 255);
TEST_BASIC_TYPE_FIELD_ASSIGNMENT(message, char_value, 100, UINT8_MAX);
TEST_BASIC_TYPE_FIELD_ASSIGNMENT(message, float32_value, 1.125f, FLT_MAX);
Expand All @@ -510,7 +510,6 @@ TEST(Test_messages, string_arrays_default) {
ASSERT_EQ(3ul, message.string_values_default.size());
}

// TODO(mikaelarguedas) reenable this test when bounded strings enforce length
TEST(Test_messages, DISABLED_Test_bounded_strings) {
rosidl_generator_tests::msg::Strings message;
TEST_STRING_FIELD_ASSIGNMENT(message, bounded_string_value, "", "Deep into")
Expand Down
Loading