Make format string agree with argument type.#24
Merged
clalancette merged 2 commits intomasterfrom May 1, 2019
Merged
Conversation
This resolves warnings which popped up as a result of ros2/rcutils#154.
dirk-thomas
reviewed
May 1, 2019
| "%g ) than the lower bound you provided (" | ||
| "%g) (will print only once)", | ||
| "%ld ) than the lower bound you provided (" | ||
| "%ld) (will print only once)", |
Member
There was a problem hiding this comment.
PRId64 looks like the right thing for int64_t.
clalancette
reviewed
May 1, 2019
| RCUTILS_LOG_WARN_ONCE("Messages of type %d arrived closer (" | ||
| "%g ) than the lower bound you provided (" | ||
| "%g) (will print only once)", | ||
| "%ld ) than the lower bound you provided (" |
Contributor
There was a problem hiding this comment.
From what I can tell, this is printing out a rclcpp::Time.nanoseconds(), which is an int64_t. While the above most likely works on 64-bit arches, the truly portable way to do this is with %PRId64 (that way it won't warn on 32-bit either). I'm going to change these two to use that instead.
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
dirk-thomas
approved these changes
May 1, 2019
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves warnings which popped up as a result of
ros2/rcutils#154.