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

rclc_parameter: Fix rcl return values #270

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Conversation

bjsowa
Copy link
Contributor

@bjsowa bjsowa commented Mar 18, 2022

I was looking through the code and noticed a potential problem with the way return values are processed in rclc_parameter functions.
RCL_RET_OK is defined as 0, so doing bitwise and operations on it will not change its value.
I think the author meant to use bitwise or operators instead. That way if one of the function results in an error, the return value will not be equal to RCL_RET_OK.

@pablogs9
Copy link
Member

Good catch

@pablogs9
Copy link
Member

@mergify backport foxy galactic

@mergify
Copy link
Contributor

mergify bot commented Mar 21, 2022

backport foxy galactic

🟠 Waiting for conditions to match

  • merged [:pushpin: backport requirement]

Hey, I reacted but my real name is @Mergifyio

Copy link
Member

@pablogs9 pablogs9 left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2022

Codecov Report

Merging #270 (c813edc) into master (449575c) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   64.67%   64.58%   -0.10%     
==========================================
  Files          16       16              
  Lines        2197     2197              
  Branches      647      647              
==========================================
- Hits         1421     1419       -2     
- Misses        460      461       +1     
- Partials      316      317       +1     
Impacted Files Coverage Δ
...lc_parameter/src/rclc_parameter/parameter_server.c 73.20% <100.00%> (ø)
rclc/src/rclc/action_goal_handle.c 58.59% <0.00%> (-1.28%) ⬇️

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 449575c...c813edc. Read the comment docs.

@Acuadros95
Copy link
Collaborator

Acuadros95 commented Mar 21, 2022

Nice! Also, CI error is not related to the PR.

Copy link
Contributor

@JanStaschulat JanStaschulat left a comment

Choose a reason for hiding this comment

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

Great catch. LGTM.

@JanStaschulat
Copy link
Contributor

Failing CI build on ROS 2 build farm due to Ubuntu update to jammy

*** No rule to make target '/usr/lib/x86_64-linux-gnu/libpython3.9.so', needed by 'librclc.so'.  Stop.

If not critical, I would wait until that issue is fixed. Otherwise, we could also merge. See related issue: #267

@pablogs9
Copy link
Member

I'm ok with waiting

@pablogs9 pablogs9 closed this Mar 25, 2022
@pablogs9 pablogs9 reopened this Mar 25, 2022
@JanStaschulat
Copy link
Contributor

JanStaschulat commented Apr 1, 2022

@bjsowa The build jobs on open robotics build farm are running again. However, a change in the ci.yml was also necessary.

You have to options:
A) You could re-do the following changes in ci.yml as in PR https://github.com/ros2/rclc/pull/266/files and push your changes.

B) pull master branch and rebase your PR on master and then push.

@pablogs9
Copy link
Member

pablogs9 commented Apr 4, 2022

I have rebased this

@pablogs9
Copy link
Member

pablogs9 commented Apr 4, 2022

CI ok, merging

@pablogs9 pablogs9 merged commit 56ee3c1 into ros2:master Apr 4, 2022
mergify bot pushed a commit that referenced this pull request Apr 4, 2022
Signed-off-by: Błażej Sowa <[email protected]>
(cherry picked from commit 56ee3c1)
mergify bot pushed a commit that referenced this pull request Apr 4, 2022
Signed-off-by: Błażej Sowa <[email protected]>
(cherry picked from commit 56ee3c1)
@mergify
Copy link
Contributor

mergify bot commented Apr 4, 2022

backport foxy galactic

✅ Backports have been created

pablogs9 pushed a commit that referenced this pull request Apr 4, 2022
Signed-off-by: Błażej Sowa <[email protected]>
(cherry picked from commit 56ee3c1)

Co-authored-by: Błażej Sowa <[email protected]>
JanStaschulat added a commit that referenced this pull request Apr 14, 2022
* rclc_parameter: Fix rcl return values (#270)

Signed-off-by: Błażej Sowa <[email protected]>
(cherry picked from commit 56ee3c1)

* trigger build job on open robotics build farm

Signed-off-by: Jan Staschulat (CR/ADA1.2) <[email protected]>

* trigger build job on open robotics build farm (2)

Signed-off-by: Jan Staschulat (CR/ADA1.2) <[email protected]>

Co-authored-by: Błażej Sowa <[email protected]>
Co-authored-by: Jan Staschulat (CR/ADA1.2) <[email protected]>
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