diff --git a/controller_interface/CMakeLists.txt b/controller_interface/CMakeLists.txt index 7486ee3414..56b2fb0164 100644 --- a/controller_interface/CMakeLists.txt +++ b/controller_interface/CMakeLists.txt @@ -1,8 +1,13 @@ cmake_minimum_required(VERSION 3.5) project(controller_interface) +<<<<<<< HEAD if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra) +======= +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") + add_compile_options(-Wall -Wextra -Wconversion) +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) endif() find_package(ament_cmake REQUIRED) diff --git a/controller_manager/CMakeLists.txt b/controller_manager/CMakeLists.txt index 53999d4f70..f4979ba2af 100644 --- a/controller_manager/CMakeLists.txt +++ b/controller_manager/CMakeLists.txt @@ -1,8 +1,13 @@ cmake_minimum_required(VERSION 3.5) project(controller_manager) +<<<<<<< HEAD if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra) +======= +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") + add_compile_options(-Wall -Wextra -Wconversion) +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) endif() set(THIS_PACKAGE_INCLUDE_DEPENDS diff --git a/hardware_interface/CMakeLists.txt b/hardware_interface/CMakeLists.txt index 5892f0c3b3..909ff69b6b 100644 --- a/hardware_interface/CMakeLists.txt +++ b/hardware_interface/CMakeLists.txt @@ -1,8 +1,13 @@ cmake_minimum_required(VERSION 3.5) project(hardware_interface) +<<<<<<< HEAD if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra) +======= +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") + add_compile_options(-Wall -Wextra -Wconversion) +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) endif() set(THIS_PACKAGE_INCLUDE_DEPENDS diff --git a/hardware_interface/src/component_parser.cpp b/hardware_interface/src/component_parser.cpp index 7792b0fbf4..e087d39c95 100644 --- a/hardware_interface/src/component_parser.cpp +++ b/hardware_interface/src/component_parser.cpp @@ -348,7 +348,8 @@ ComponentInfo parse_complex_component_from_xml(const tinyxml2::XMLElement * comp component.command_interfaces.push_back(parse_interfaces_from_xml(command_interfaces_it)); component.command_interfaces.back().data_type = parse_data_type_attribute(command_interfaces_it); - component.command_interfaces.back().size = parse_size_attribute(command_interfaces_it); + component.command_interfaces.back().size = + static_cast(parse_size_attribute(command_interfaces_it)); command_interfaces_it = command_interfaces_it->NextSiblingElement(kCommandInterfaceTag); } @@ -358,7 +359,8 @@ ComponentInfo parse_complex_component_from_xml(const tinyxml2::XMLElement * comp { component.state_interfaces.push_back(parse_interfaces_from_xml(state_interfaces_it)); component.state_interfaces.back().data_type = parse_data_type_attribute(state_interfaces_it); - component.state_interfaces.back().size = parse_size_attribute(state_interfaces_it); + component.state_interfaces.back().size = + static_cast(parse_size_attribute(state_interfaces_it)); state_interfaces_it = state_interfaces_it->NextSiblingElement(kStateInterfaceTag); } diff --git a/joint_limits/CMakeLists.txt b/joint_limits/CMakeLists.txt index 314ec67272..a4fd1b198b 100644 --- a/joint_limits/CMakeLists.txt +++ b/joint_limits/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.5) project(joint_limits) +<<<<<<< HEAD # Default to C++14 if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 14) @@ -8,6 +9,10 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra) +======= +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") + add_compile_options(-Wall -Wextra -Wconversion) +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) endif() find_package(ament_cmake REQUIRED) diff --git a/transmission_interface/CMakeLists.txt b/transmission_interface/CMakeLists.txt index 1a51bbb3e8..02557008b0 100644 --- a/transmission_interface/CMakeLists.txt +++ b/transmission_interface/CMakeLists.txt @@ -1,8 +1,13 @@ cmake_minimum_required(VERSION 3.5) project(transmission_interface) +<<<<<<< HEAD if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) +======= +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") + add_compile_options(-Wall -Wextra -Wpedantic -Wconversion) +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) endif() set(THIS_PACKAGE_INCLUDE_DEPENDS diff --git a/transmission_interface/test/random_generator_utils.hpp b/transmission_interface/test/random_generator_utils.hpp index 01e1245e48..07995736c0 100644 --- a/transmission_interface/test/random_generator_utils.hpp +++ b/transmission_interface/test/random_generator_utils.hpp @@ -33,7 +33,11 @@ struct RandomDoubleGenerator RandomDoubleGenerator(double min_val, double max_val, unsigned int seed = 1234) : min_val_(min_val), max_val_(max_val) { +<<<<<<< HEAD srand(seed); +======= + srand(static_cast(time(nullptr))); +>>>>>>> 1b83a5b (Add -Wconversion flag to protect future developments (#1053)) } double operator()() {