Skip to content

Commit

Permalink
Merge branch 'main' into codecvt-win32
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Apr 27, 2022
2 parents e17a909 + e233791 commit a52487f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion api/include/opentelemetry/baggage/baggage.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ class Baggage
};

auto from_hex = [](char c) -> char {
return std::isdigit(c) ? c - '0' : std::toupper(c) - 'A' + 10;
// c - '0' produces integer type which could trigger error/warning when casting to char,
// but the cast is safe here.
return static_cast<char>(std::isdigit(c) ? c - '0' : std::toupper(c) - 'A' + 10);
};

std::string ret;
Expand Down
4 changes: 2 additions & 2 deletions exporters/etw/include/opentelemetry/exporters/etw/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ static inline GUID GetProviderGuid(const char *providerName)
guid.Data4[6] = buffer2[14];
guid.Data4[7] = buffer2[15];

delete buffer;
delete buffer2;
delete[] buffer;
delete[] buffer2;

return guid;
}
Expand Down

0 comments on commit a52487f

Please sign in to comment.