Skip to content
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

[BUILD] Warning cleanup, single character wrapped by std::string #2137

Merged

Conversation

cngzhnp
Copy link
Contributor

@cngzhnp cngzhnp commented May 11, 2023

Fixes #2134

Changes

Single character assignment causes a warning with GCC 12 and get rid of it by wrapping this with std::string.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@cngzhnp cngzhnp marked this pull request as ready for review May 11, 2023 08:04
@cngzhnp cngzhnp requested a review from a team May 11, 2023 08:04
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Merging #2137 (5375fae) into main (75d76a1) will increase coverage by 0.03%.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2137      +/-   ##
==========================================
+ Coverage   87.15%   87.17%   +0.03%     
==========================================
  Files         166      166              
  Lines        4777     4777              
==========================================
+ Hits         4163     4164       +1     
+ Misses        614      613       -1     
Impacted Files Coverage Δ
...include/opentelemetry/ext/http/common/url_parser.h 92.00% <50.00%> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -83,7 +83,7 @@ class UrlParser
pos = url_.find_first_of("/?", cpos);
if (pos == std::string::npos)
{
path_ = "/"; // use default path
path_ = std::string("/"); // use default path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the GCC bug link here for reference?

@marcalff marcalff merged commit c9f14e9 into open-telemetry:main May 11, 2023
@marcalff marcalff changed the title Single character wrapped by std::string to get rid of warning [BUILD] Warning cleanup, single character wrapped by std::string May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCC 12 warns about there could be overlap during memcpy
4 participants