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

Make integer to enum conversion explicit [SAR-261] #1098

Merged
merged 5 commits into from
Mar 1, 2022

Conversation

fpezzinosn
Copy link
Contributor

The signature of the function sbp_register_callback_generic defined here expects an sbp_msg_type_t enum as a second parameter. The same happens with the third parameter of process_frame defined here.

Without this explicit conversion, the static analyzer thinks there are two different functions with the same name.

c/src/sbp.c Show resolved Hide resolved
c/src/sbp.c Outdated Show resolved Hide resolved
Copy link
Contributor

@silverjam silverjam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update the templates, otherwise these changes will be lost when we add new messages: https://github.com/swift-nav/libsbp/blob/master/generator/sbpg/targets/resources/c/sbp_msg_type_template.h#L33

@fpezzinosn fpezzinosn merged commit 78d4357 into master Mar 1, 2022
@fpezzinosn fpezzinosn deleted the fpezzinosn/SAR-261 branch March 1, 2022 12:12
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.

3 participants