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

[ControllerInterface] Avoid warning about conversion from int64_t to unsigned int (backport #1173) #1630

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 20, 2024

Without this there is a warning. For what I found the best way is to do static cast.

ros2_control/controller_interface/src/controller_interface_base.cpp:88:67: warning: conversion from ‘int64_t’{aka ‘long int’} to ‘unsigned int’ may change value [-Wconversion]
88 |     update_rate_ = get_node()->get_parameter("update_rate").as_int();

#GitHub-Programming-Rocks


This is an automatic backport of pull request #1173 done by Mergify.

Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.45%. Comparing base (2481521) to head (d026f0b).

Additional details and impacted files
@@           Coverage Diff           @@
##             iron    #1630   +/-   ##
=======================================
  Coverage   87.45%   87.45%           
=======================================
  Files         101      101           
  Lines        8080     8080           
  Branches      711      711           
=======================================
  Hits         7066     7066           
  Misses        718      718           
  Partials      296      296           
Flag Coverage Δ
unittests 87.45% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...roller_interface/src/controller_interface_base.cpp 85.71% <100.00%> (ø)

…o `unsigned int` (#1173)

Without this there is a warning. For what I found the best way is to do static cast.

```
ros2_control/controller_interface/src/controller_interface_base.cpp:88:67: warning: conversion from ‘int64_t’{aka ‘long int’} to ‘unsigned int’ may change value [-Wconversion]
88 |     update_rate_ = get_node()->get_parameter("update_rate").as_int();
```

(cherry picked from commit 2569b76)
@bmagyar bmagyar merged commit fd21cfa into iron Jul 21, 2024
10 of 11 checks passed
@bmagyar bmagyar deleted the mergify/bp/iron/pr-1173 branch July 21, 2024 20:20
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.

5 participants