Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
matrix:
include:
- cmake_options: all-options-abiv1-preview
warning_limit: 53
warning_limit: 50
- cmake_options: all-options-abiv2-preview
warning_limit: 55
warning_limit: 52
env:
CC: /usr/bin/clang-18
CXX: /usr/bin/clang++-18
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Increment the:
* [BAZEL] Add ENABLE_OTLP_GRPC_SSL_MTLS_PREVIEW define to otlp_grpc_log_record_exporter
[#3988](https://github.com/open-telemetry/opentelemetry-cpp/pull/3988)

* [CODE HEALTH] Fix clang-tidy narrowing conversions in baggage
[#3989](https://github.com/open-telemetry/opentelemetry-cpp/pull/3989)

Important changes:

* Enable WITH_OTLP_RETRY_PREVIEW by default
Expand Down
6 changes: 3 additions & 3 deletions api/include/opentelemetry/baggage/baggage.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class OPENTELEMETRY_EXPORT Baggage
else
{
ret.push_back('%');
ret.push_back(to_hex(c >> 4));
ret.push_back(to_hex(c & 15));
ret.push_back(to_hex(static_cast<char>(c >> 4)));
ret.push_back(to_hex(static_cast<char>(c & 15)));
}
}

Expand Down Expand Up @@ -267,7 +267,7 @@ class OPENTELEMETRY_EXPORT Baggage
err = 1;
return "";
}
ret.push_back(from_hex(str[i + 1]) << 4 | from_hex(str[i + 2]));
ret.push_back(static_cast<char>(from_hex(str[i + 1]) << 4 | from_hex(str[i + 2])));
i += 2;
}
else if (str[i] == '+')
Expand Down
Loading