[API] fix sign-conversion warnings in span & trace id#3761
Merged
marcalff merged 1 commit intoopen-telemetry:mainfrom Nov 24, 2025
Merged
Conversation
|
|
9d4aa88 to
fb36519
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3761 +/- ##
=======================================
Coverage 89.95% 89.95%
=======================================
Files 225 225
Lines 7158 7158
=======================================
Hits 6438 6438
Misses 720 720
🚀 New features to boost your workflow:
|
marcalff
reviewed
Nov 22, 2025
Member
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the fix, see comments.
| { | ||
| buffer[i * 2 + 0] = kHex[(rep_[i] >> 4) & 0xF]; | ||
| buffer[i * 2 + 1] = kHex[(rep_[i] >> 0) & 0xF]; | ||
| buffer[static_cast<size_t>(i) * 2U + 0] = kHex[(rep_[i] >> 4) & 0xF]; |
Member
There was a problem hiding this comment.
Since the original issue is about sign, how about changing variable i to unsigned in the for loop ?
Contributor
Author
There was a problem hiding this comment.
Done, plus two other similar warnings.
fb36519 to
f723523
Compare
owent
approved these changes
Nov 24, 2025
malkia
added a commit
to malkia/opentelemetry-cpp
that referenced
this pull request
Nov 24, 2025
[API] fix sign-conversion warnings in span & trace id (open-telemetry#3761)
1 task
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.
Changes
Fix some warnings appearing with
-Wsign-conversion: