Skip to content

Commit

Permalink
Enable -Wall -Wextra -Wpedantic (ros#20)
Browse files Browse the repository at this point in the history
* Enable warnings

Signed-off-by: Audrow Nash <[email protected]>

* Remove move in function return

Signed-off-by: Audrow Nash <[email protected]>
  • Loading branch information
audrow authored Oct 1, 2020
1 parent 97d74d8 commit 9b9e8d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions urdf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY)
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

install(FILES ${generated_compat_header} DESTINATION include/${PROJECT_NAME})

Expand Down
2 changes: 1 addition & 1 deletion urdf/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ModelImplementation::load_plugin(const std::string & plugin_name)
} catch (const pluginlib::CreateClassException &) {
fprintf(stderr, "Failed to load urdf_parser_plugin [%s]\n", plugin_name.c_str());
}
return std::move(plugin_instance);
return plugin_instance;
}

bool Model::initString(const std::string & data)
Expand Down

0 comments on commit 9b9e8d9

Please sign in to comment.