abseil / abseil/abseil-cpp

signed/unsigned compare in btree.h

未關閉
#771 7 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
C++
星號
18.1k
分支
3.2k
平均合併
20 小時 36 分鐘
30 天內合併 PR
1

描述

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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。