signed/unsigned compare in btree.h
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
The issue points to a signed/unsigned comparison warning in external/abseil/absl/container/internal/btree.h at line 2439. Look at the variable 'max_count' and the constant 'kNodeValues' to determine their types. The fix likely involves casting or changing the type of one to match. Compile the file with sign comparison warnings enabled to verify the fix. Run the relevant tests for the btree container to ensure no regressions.
Written by the indexing model from the issue text.
Description
Describe the bug
Since the enum containing kNodeValues was changed to be explicitly uint32_t, there is now a signed/unsigned comparison:
external/abseil/absl/container/internal/btree.h:2439:19: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare]
2439 | if (max_count < kNodeValues) {
| ~~~~~~~~~~^~~~~~~~~~~~~
Steps to reproduce the bug
Compile revision c6b3f2cf583d8fec124f9d70a172b513363506fe with sign comparison warnings turned on
What version of Abseil are you using?
HEAD (c6b3f2cf583d8fec124f9d70a172b513363506fe and later)
What operating system and version are you using
Linux (RHEL 6)
What compiler and version are you using?
gcc 9.1.0
clang 8.0.1
clang 9.0.0
What build system are you using?
cmake 3.15.0
Additional context
- Dominant language
- C++
- Stars
- 18.1k
- Forks
- 3.2k
- Avg merge
- 12h 35m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from abseil/abseil-cpp
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
abseil/abseil-cpp#2168 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
abseil/abseil-cpp#2167 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
abseil/abseil-cpp#2153 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
abseil/abseil-cpp#2140 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
abseil/abseil-cpp#2027 · 2 reactions ·
All issues in abseil/abseil-cpp
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·