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: avoid useless cast #853

Merged
merged 1 commit into from
May 4, 2022
Merged

fix: avoid useless cast #853

merged 1 commit into from
May 4, 2022

Conversation

wep21
Copy link
Contributor

@wep21 wep21 commented May 4, 2022

Description

fix the following error in rolling distro

/home/daisuke/workspace/autoware/install/osqp_interface/include/osqp_interface/osqp_interface.hpp:36:25: note: in expansion of macro ‘OSQP_INFTY’
   36 | constexpr c_float INF = OSQP_INFTY;
      |                         ^~~~~~~~~~
/opt/ros/rolling/include/osqp/constants.h:100:23: error: useless cast to type ‘c_float’ {aka ‘double’} [-Werror=useless-cast]
  100 | #  define OSQP_INFTY ((c_float)1e30)        // infinity
      |                       ^~~~~~~~~~~~~
/home/daisuke/workspace/autoware/install/osqp_interface/include/osqp_interface/osqp_interface.hpp:36:25: note: in expansion of macro ‘OSQP_INFTY’
   36 | constexpr c_float INF = OSQP_INFTY;
      |                         ^~~~~~~~~~
In file included from /opt/ros/rolling/include/osqp/types.h:9,
                 from /opt/ros/rolling/include/osqp/osqp.h:9,
                 from /home/daisuke/workspace/autoware/install/osqp_interface/include/osqp_interface/osqp_interface.hpp:20,
                 from /home/daisuke/workspace/autoware/src/universe/autoware.universe/control/trajectory_follower/include/trajectory_follower/mpc.hpp:22,
                 from /home/daisuke/workspace/autoware/src/universe/autoware.universe/control/trajectory_follower/src/mpc.cpp:15:
/opt/ros/rolling/include/osqp/constants.h:100:32: warning: use of old-style cast to ‘c_float’ {aka ‘double’} [-Wold-style-cast]
  100 | #  define OSQP_INFTY ((c_float)1e30)        // infinity
      |                                ^~~~
/opt/ros/rolling/include/osqp/constants.h:100:32: note: in definition of macro ‘OSQP_INFTY’
  100 | #  define OSQP_INFTY ((c_float)1e30)        // infinity
      |                                ^~~~
/opt/ros/rolling/include/osqp/constants.h:100:23: error: useless cast to type ‘c_float’ {aka ‘double’} [-Werror=useless-cast]
  100 | #  define OSQP_INFTY ((c_float)1e30)        // infinity
      |                       ^~~~~~~~~~~~~
/home/daisuke/workspace/autoware/install/osqp_interface/include/osqp_interface/osqp_interface.hpp:36:25: note: in expansion of macro ‘OSQP_INFTY’
   36 | constexpr c_float INF = OSQP_INFTY;

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@wep21 wep21 force-pushed the fix/useless-cast branch from 4c78bba to bc960ed Compare May 4, 2022 17:45
Signed-off-by: Daisuke Nishimatsu <[email protected]>
@wep21 wep21 requested a review from kenji-miyake May 4, 2022 17:45
@wep21 wep21 enabled auto-merge (squash) May 4, 2022 17:59
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #853 (bc960ed) into main (acbc54a) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main    #853   +/-   ##
=====================================
  Coverage   9.53%   9.53%           
=====================================
  Files        931     931           
  Lines      57715   57715           
  Branches    6863    6863           
=====================================
  Hits        5505    5505           
  Misses     47686   47686           
  Partials    4524    4524           
Flag Coverage Δ *Carryforward flag
differential 14.15% <ø> (?)
total 9.53% <ø> (ø) Carriedforward from acbc54a

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acbc54a...bc960ed. Read the comment docs.

@wep21 wep21 merged commit 263e985 into main May 4, 2022
@wep21 wep21 deleted the fix/useless-cast branch May 4, 2022 18:25
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request May 19, 2022
Signed-off-by: Daisuke Nishimatsu <[email protected]>
Signed-off-by: kminoda <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
Signed-off-by: Daisuke Nishimatsu <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
Signed-off-by: Daisuke Nishimatsu <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
Signed-off-by: Daisuke Nishimatsu <[email protected]>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
Signed-off-by: Daisuke Nishimatsu <[email protected]>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Oct 3, 2023
…ise_v0.10.1

fix(obstacle_cruise_planner): fix stop against objects after backward trajectory terminal
iwatake2222 pushed a commit to iwatake2222/autoware.universe that referenced this pull request Jan 17, 2025
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.

2 participants