Actions
Cleanup #57587
closedmon: fix Elector warnings
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Tags:
Backport:
Reviewed:
Description
`ninja mon -j$(nproc)` on the latest main branch.
[27/45] Building CXX object src/mon/CMakeFiles/mon.dir/Elector.cc.o
../src/mon/Elector.cc: In member function ‘void Elector::ping_check(int)’:
../src/mon/Elector.cc:495:12: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<char> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
495 | if (peer >= mon->monmap->ranks.size()) {
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[45/45] Linking CXX static library lib/libmon.a
Suggested fix:
https://github.com/ceph/ceph/blob/main/src/mon/Elector.cc
- if (peer >= mon->monmap->ranks.size()) {
+ if ((unsigned long)peer >= mon->monmap->ranks.size()) {
Updated by Laura Flores over 1 year ago
- Status changed from New to Fix Under Review
- Pull request ID set to 48154
Updated by Laura Flores over 1 year ago
- Status changed from Fix Under Review to Resolved
- Pull request ID changed from 48154 to 48289
Resolved by https://github.com/ceph/ceph/pull/48289.
Actions