@@ -393,6 +393,7 @@ TEST(TestFunctionTraits, argument_types) {
393393
394394 auto bind_one_bool = std::bind (
395395 &ObjectMember::callback_one_bool, &object_member, std::placeholders::_1);
396+ (void )bind_one_bool; // to quiet clang
396397
397398 static_assert (
398399 std::is_same<
@@ -402,6 +403,7 @@ TEST(TestFunctionTraits, argument_types) {
402403
403404 auto bind_one_bool_const = std::bind (
404405 &ObjectMember::callback_one_bool_const, &object_member, std::placeholders::_1);
406+ (void )bind_one_bool_const; // to quiet clang
405407
406408 static_assert (
407409 std::is_same<
@@ -413,6 +415,7 @@ TEST(TestFunctionTraits, argument_types) {
413415 auto bind_two_bools = std::bind (
414416 &ObjectMember::callback_two_bools, &object_member, std::placeholders::_1,
415417 std::placeholders::_2);
418+ (void )bind_two_bools; // to quiet clang
416419
417420 static_assert (
418421 std::is_same<
@@ -429,6 +432,7 @@ TEST(TestFunctionTraits, argument_types) {
429432 auto bind_one_bool_one_float = std::bind (
430433 &ObjectMember::callback_one_bool_one_float, &object_member, std::placeholders::_1,
431434 std::placeholders::_2);
435+ (void )bind_one_bool_one_float; // to quiet clang
432436
433437 static_assert (
434438 std::is_same<
@@ -447,6 +451,7 @@ TEST(TestFunctionTraits, argument_types) {
447451 >::value, " Functor accepts a float as second argument" );
448452
449453 auto bind_one_int = std::bind (func_one_int, std::placeholders::_1);
454+ (void )bind_one_int; // to quiet clang
450455
451456 static_assert (
452457 std::is_same<
@@ -455,6 +460,7 @@ TEST(TestFunctionTraits, argument_types) {
455460 >::value, " Functor accepts an int as first argument" );
456461
457462 auto bind_two_ints = std::bind (func_two_ints, std::placeholders::_1, std::placeholders::_2);
463+ (void )bind_two_ints; // to quiet clang
458464
459465 static_assert (
460466 std::is_same<
@@ -470,6 +476,7 @@ TEST(TestFunctionTraits, argument_types) {
470476
471477 auto bind_one_int_one_char = std::bind (
472478 func_one_int_one_char, std::placeholders::_1, std::placeholders::_2);
479+ (void )bind_one_int_one_char; // to quiet clang
473480
474481 static_assert (
475482 std::is_same<
@@ -530,18 +537,21 @@ TEST(TestFunctionTraits, check_arguments) {
530537 (void )one;
531538 return 1 ;
532539 };
540+ (void )lambda_one_int; // to quiet clang
533541
534542 auto lambda_two_ints = [](int one, int two) {
535543 (void )one;
536544 (void )two;
537545 return 2 ;
538546 };
547+ (void )lambda_two_ints; // to quiet clang
539548
540549 auto lambda_one_int_one_char = [](int one, char two) {
541550 (void )one;
542551 (void )two;
543552 return 3 ;
544553 };
554+ (void )lambda_one_int_one_char; // to quiet clang
545555
546556 static_assert (
547557 rclcpp::function_traits::check_arguments<decltype (lambda_one_int), int >::value,
@@ -572,6 +582,7 @@ TEST(TestFunctionTraits, check_arguments) {
572582
573583 auto bind_one_bool = std::bind (
574584 &ObjectMember::callback_one_bool, &object_member, std::placeholders::_1);
585+ (void )bind_one_bool; // to quiet clang
575586
576587 // Test std::bind functions
577588 static_assert (
@@ -580,6 +591,7 @@ TEST(TestFunctionTraits, check_arguments) {
580591
581592 auto bind_one_bool_const = std::bind (
582593 &ObjectMember::callback_one_bool_const, &object_member, std::placeholders::_1);
594+ (void )bind_one_bool_const; // to quiet clang
583595
584596 // Test std::bind functions
585597 static_assert (
@@ -745,6 +757,7 @@ TEST_F(TestMember, bind_member_functor) {
745757 auto bind_member_functor = std::bind (
746758 &TestMember::MemberFunctor, this , std::placeholders::_1,
747759 std::placeholders::_2, std::placeholders::_3);
760+ (void )bind_member_functor; // to quiet clang
748761
749762 static_assert (
750763 rclcpp::function_traits::check_arguments<decltype (bind_member_functor), int , float ,
0 commit comments