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 integer type in RCLCPP_* macro printf. #492

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

clalancette
Copy link
Contributor

While building on macOS, a warning shows up like:

format specifies type 'long' but the argument has type 'int64_t' (aka 'long long')

The problem is that %ld isn't correct for int64_t on all
platforms. Switch to the PRId64 macro so the type is correct
everywhere.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

While building on macOS, a warning shows up like:

format specifies type 'long' but the argument has type 'int64_t' (aka 'long long')

The problem is that %ld isn't correct for int64_t on all
platforms.  Switch to the PRId64 macro so the type is correct
everywhere.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
@clalancette
Copy link
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor Author

The failure on Windows is not because of this PR. The failure on PR jobs seems to be a long-standing issue. I'm going to go ahead and merge this, thanks for the review.

@clalancette clalancette merged commit 703e235 into master Mar 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the clalancette/fix-int-type branch March 29, 2021 13:59
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.

None yet

2 participants