Enable capability to build with pedantic flags.#259
Open
leander-dsouza wants to merge 1 commit intoros2:rollingfrom
Open
Enable capability to build with pedantic flags.#259leander-dsouza wants to merge 1 commit intoros2:rollingfrom
leander-dsouza wants to merge 1 commit intoros2:rollingfrom
Conversation
Signed-off-by: Leander Stephen D'Souza <leanderdsouza1234@gmail.com>
5cc39f3 to
4d92228
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Let's say we have a
demo_pkgas follows:. ├── CMakeLists.txt ├── msg │ └── Demo.msg └── package.xmlCMakeLists.txt:cmake_minimum_required(VERSION 3.8) project(demo_pkg) find_package(ament_cmake REQUIRED) find_package(rosidl_default_generators REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} "msg/Demo.msg" ) ament_package()package.xml:Demo.msg:Building with the
-Wpedanticflag causes the following errors:This is because
-Wpedanticprevents casting a function pointer directly tovoid *.Therefore, instead of casting, the bytes of the function pointer are copied into a
void *viamemcpythrough the added contribution.To test this fix, rosidl and rosidl_typesupport_fastrps needs to compiled from source.
Fixes # (issue)
Is this user-facing behavior change?
Yes, it is a user-facing behavior change, as now new packages can be passed with -
--cmake-args -DCMAKE_C_FLAGS="-Wpedantic"Did you use Generative AI?
Additional Information