-
Notifications
You must be signed in to change notification settings - Fork 386
Fix: Correct int64_t Format Specifier (MacOS) #2817
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
Conversation
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
christophfroehlich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
error: format specifies type 'long long' but the argument has type 'int64_t' (aka 'long') [-Werror,-Wformat]
Yes, I saw that error. The root cause is the platform-dependent definition of int64_t — on macOS it resolves to long long (testing there). Thinking about a more portable fix now |
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2817 +/- ##
=======================================
Coverage 89.62% 89.62%
=======================================
Files 152 152
Lines 17817 17817
Branches 1455 1455
=======================================
Hits 15968 15968
Misses 1263 1263
Partials 586 586
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
|
I put MacOS in the title although I think it may have to do more with the architecture itself. Here's an alternative idea @christophfroehlich : what if we drop |
|
sure, we can do that |
|
@bmagyar @christophfroehlich instead of dropping the format flag, how about changing the |
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
|
@christophfroehlich there is a failing pre-commit should we wait for it or merge and open a PR fixing it? |
|
oops, no let's wait for the fix |
Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com>
--------- Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com> Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com> (cherry picked from commit 30416ba)
--------- Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com> Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com> (cherry picked from commit 30416ba)
…ntrols#2817) --------- Signed-off-by: Dhruv Patel <dhruvpatel2991998@gmail.com> Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Fix: Correct
int64_tFormat Specifier and Set CMake Policy CMP0167This PR resolves a C++ compilation error by correcting a format specifier mismatch in
controller_interface/src/controller_interface_base.cpp.%ld(long) to the proper%lld(long long/int64_t) in the logging statement to match the argument type.