facebook / facebook/rocksdb

io_posix.cc:1377 error: comparison of integers of different signs: 'long long' and 'unsigned long long'

Open
#10,926 2 comments 0 reactions 0 assignees View on GitHub
bug up-for-grabs
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

### Expected behavior

The build runs without any warning.

### Actual behavior

The following warning is shown (and handled as an error by default) :

```
io_posix.cc:1377:39: error: comparison of integers of different signs: 'long long' and 'unsigned long long' [-Werror,-Wsign-compare]
```

### Steps to reproduce the behavior

```
mkdir build
cd build
cmake .. -DANDROID_PLATFORM=android-24 -DANDROID_ABI=armeabi-v7a -DANDROID_STL=c++_shared -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk-linux/build/cmake/android.toolchain.cmake
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the warning with the provided CMake Android configuration, then inspect io_posix.cc at line 1377 and the surrounding comparison. Verify the change by rebuilding with the same configuration; done means the signedness warning no longer appears or fails the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.