Project

General

Profile

Actions

Cleanup #57587

closed

mon: fix Elector warnings

Added by Laura Flores over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:
Component(RADOS):
Pull request ID:

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()) {

Actions #1

Updated by Laura Flores over 1 year ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 48154
Actions #2

Updated by Laura Flores over 1 year ago

  • Status changed from Fix Under Review to Resolved
  • Pull request ID changed from 48154 to 48289
Actions

Also available in: Atom PDF