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

fix compiler warnings #1044

Merged
merged 11 commits into from
Nov 1, 2021
Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Oct 31, 2021

Fixes various compiler warnings.

Changes

Please provide a brief description of the changes here.

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

@esigo esigo requested a review from a team October 31, 2021 09:51
@@ -183,7 +183,7 @@ static const struct

inline const char *attr(uint32_t attr)
{
for (int i = 0; i < OTEL_CPP_TRACE_ATTRIBUTES_MAX; i++)
for (long unsigned int i = 0; i < OTEL_CPP_TRACE_ATTRIBUTES_MAX; i++)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the type long unsigned int? Probably unsigned int?

Copy link
Member Author

Choose a reason for hiding this comment

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

it was the type compiler was showing. I changed to size_t.

@codecov
Copy link

codecov bot commented Oct 31, 2021

Codecov Report

Merging #1044 (b0f06e5) into main (64d736e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1044      +/-   ##
==========================================
- Coverage   94.85%   94.85%   -0.00%     
==========================================
  Files         151      151              
  Lines        5972     5971       -1     
==========================================
- Hits         5664     5663       -1     
  Misses        308      308              
Impacted Files Coverage Δ
...k/include/opentelemetry/sdk/common/env_variables.h 100.00% <ø> (ø)
sdk/test/resource/resource_test.cc 93.81% <100.00%> (-0.05%) ⬇️

@esigo
Copy link
Member Author

esigo commented Oct 31, 2021

@ThomsonTan I can't reproduce CI / Bazel valgrind (pull_request) fail locally. Any idea what's going wrong?

EDIT:
I found that the failure is actually a timeout:

Value of: waitForRequests(2, old_count + 1)
  Actual: false
Expected: true

@esigo esigo requested a review from ThomsonTan October 31, 2021 22:04
@lalitb lalitb merged commit bf176f3 into open-telemetry:main Nov 1, 2021
@esigo esigo deleted the fix-compiler-warnings branch November 2, 2021 21:29
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.

3 participants