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

Fix cmake flags #534

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix cmake flags #534

wants to merge 7 commits into from

Conversation

nosracd
Copy link
Contributor

@nosracd nosracd commented Oct 24, 2024

Resolves #533.

The lcm_add_c_flags and lcm_add_cxx_flags had a bug in them. Their goal was to append to variable in the parent scope, but they were using a variable in their local scope to do so. My fix was to add an additional set command in f1e0e29 which also appended to the local variable so it could be used as the base value for the parent scope variable in the next iteration of the loop.

The rest of the commits are fixing warnings that are now successfully getting enabled. Fixing the stringop-truncation warnings seemed like more of a hassle than it was worth so I just disabled that one. The other commits are fixing unused, unitialized, or shadowed variables.

The goal is to append to the parent scope's variable, but we're using the current scope to do so
Fixes warning "declaration shadows a local variable"
avoids "declared but not used" warning on release builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmake c flags not working as expected
1 participant