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 摘要。