abseil / abseil/abseil-cpp

signed/unsigned compare in btree.h

Aperta
#771 7 commenti 1 reazione 0 assegnatari Vedi su GitHub
bug
Lingua principale
C++
Stelle
18.1k
Fork
3.2k
Merge medio
20h 36m
PR unite (30g)
1

Descrizione

**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**

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.