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

environment_preload: fix windows compiler warnings #2246

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

scpeters
Copy link
Member

🦟 Bug fix

Fixes some compiler warnings in windows CI from the environment_preload system

Summary

The garden windows CI build has no test failures and just a few compiler warnings:

This is an attempt to fix the compiler warnings in the environment_preload system, specifically VisualizationTool.cc:80.

'argument': conversion from 'double' to 'unsigned int', possible loss of data

From what I can see, the /environment/visualize/res topic uses a gz::msgs::Vector3d to store 3 integers because there is no gz::msgs::Vector3i. This PR casts the double values to unsigned int in the callback and changes the internal storage and APIs to use unsigned int instead of double.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Steve Peters <[email protected]>
Use Vector3<unsigned int> for sample count variables.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested a review from arjo129 November 15, 2023 21:42
@github-actions github-actions bot added the 🌱 garden Ignition Garden label Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (c73c12b) 64.74% compared to head (6f5e848) 64.73%.

❗ Current head 6f5e848 differs from pull request most recent head 1b7fdf0. Consider uploading reports for the commit 1b7fdf0 to get more accurate results

Files Patch % Lines
.../systems/environment_preload/EnvironmentPreload.cc 0.00% 6 Missing ⚠️
...c/systems/environment_preload/VisualizationTool.cc 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           gz-sim7    #2246      +/-   ##
===========================================
- Coverage    64.74%   64.73%   -0.01%     
===========================================
  Files          357      357              
  Lines        29138    29142       +4     
===========================================
+ Hits         18864    18865       +1     
- Misses       10274    10277       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@scpeters scpeters marked this pull request as ready for review November 15, 2023 22:45
@scpeters scpeters requested a review from mjcarroll as a code owner November 15, 2023 22:45
@scpeters
Copy link
Member Author

windows CI is now clean, but UNIT_Server_TEST flaked on gz_sim-ci-pr_any-focal-amd64

Copy link
Contributor

@arjo129 arjo129 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks. Tested it and works as expected.

@arjo129 arjo129 enabled auto-merge (squash) November 16, 2023 03:52
@mjcarroll mjcarroll disabled auto-merge November 16, 2023 12:57
@mjcarroll mjcarroll merged commit 81850ce into gz-sim7 Nov 16, 2023
10 of 11 checks passed
@mjcarroll mjcarroll deleted the scpeters/clean_ci_windows branch November 16, 2023 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants