Project

General

Profile

Actions

Bug #68552

closed
CB AE

client/Client.cc:10967 warning: comparison of integer expressions of different signedness

Bug #68552: client/Client.cc:10967 warning: comparison of integer expressions of different signedness

Added by Casey Bodley about 2 years ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
Due date:
% Done:

0%

Source:
Community (dev)
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Fixed In:
v19.3.0-7094-gcc96a380ab
Released In:
v20.2.0~1276
Upkeep Timestamp:
2026-08-28T01:35:00+00:00

Description

ceph/src/client/Client.cc: In member function ‘int64_t Client::_read(Fh*, int64_t, uint64_t, ceph::bufferlist*, Context*)’:
ceph/src/client/Client.cc:10967:17: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’} [-Wsign-compare]
10967 |     if ((offset >= in->size) || (size == 0)) {
      |          ~~~~~~~^~~~~~~~~~~

introduced by commit 942474c2f5b4c696364f3b7411ae7d96444edfa8 from https://github.com/ceph/ceph/pull/59987

Related issues 1 (0 open — 1 closed)

Copied to CephFS - Backport #69681: squid: client/Client.cc:10967 warning: comparison of integer expressions of different signednessResolvedAdam Emerson

Actions

VS Updated by Venky Shankar about 2 years ago Actions #1

  • Category set to Correctness/Safety
  • Assignee set to Kotresh Hiremath Ravishankar
  • Target version set to v20.0.0
  • Source set to Community (dev)
  • Backport set to squid

JM Updated by John Mulligan almost 2 years ago Actions #2

I hit this same error trying to build on ubuntu 24.04 in container. This envioronment has set -Werror by default.

[834/1385] Building CXX object src/client/CMakeFiles/client.dir/Client.cc.o
FAILED: src/client/CMakeFiles/client.dir/Client.cc.o
/usr/bin/ccache /usr/bin/g++ -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DBOOST_A
SIO_HAS_IO_URING -DBOOST_ASIO_NO_TS_EXECUTORS -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64
 -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D__CEPH__ -D__STDC_FORMAT_MACROS -D__lin
ux__ -I/ceph/build.u24x/src/include -I/ceph/src -isystem /ceph/build.u24x/boost/incl
ude -isystem /ceph/build.u24x/include -isystem /ceph/src/xxHash -isystem /ceph/src/fmt/include -Og -Werror -std=c++20 -fPIC -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wstrict-null-sentinel -Woverloaded-virtual -DCEPH_DEBUG_MUTEX -fstack-protector-strong -D_GLIBCXX_ASSERTIONS -fdiagnostics-color=auto -MD -MT src/client/CMakeFiles/client.dir/Client.cc.o -MF src/client/CMakeFiles/client.dir/Client.cc.o.d -o src/client/CMakeFiles/client.dir/Client.cc.o -c /ceph/src/client/Client.cc
/ceph/src/client/Client.cc: In member function 'int64_t Client::_read(Fh*, int64_t, uint64_t, ceph::bufferlist*, Context*)':
/ceph/src/client/Client.cc:10980:17: error: comparison of integer expressions of different signedness: 'int64_t' {aka 'long int'} and 'uint64_t' {aka 'long unsigned int'} [-Werror=sign-compare]
10980 |     if ((offset >= in->size) || (size == 0)) {
      |          ~~~~~~~^~~~~~~~~~~
cc1plus: all warnings being treated as errors

JM Updated by Joseph Mundackal almost 2 years ago Actions #3

  • Assignee changed from Kotresh Hiremath Ravishankar to Adam Emerson
  • Pull request ID set to 60986

AE Updated by Adam Emerson almost 2 years ago Actions #4

  • Pull request ID changed from 60986 to 61327

AE Updated by Adam Emerson almost 2 years ago Actions #5

  • Status changed from New to Fix Under Review

VS Updated by Venky Shankar almost 2 years ago Actions #6

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot almost 2 years ago Actions #7

  • Copied to Backport #69681: squid: client/Client.cc:10967 warning: comparison of integer expressions of different signedness added

UB Updated by Upkeep Bot almost 2 years ago Actions #8

  • Tags (freeform) set to backport_processed

AE Updated by Adam Emerson almost 2 years ago Actions #9

  • Status changed from Pending Backport to Resolved
  • Backport deleted (squid)

PD Updated by Patrick Donnelly over 1 year ago Actions #10

  • Merge Commit set to cc96a380ab1117499fceb8135bfbbed862f50329
  • Fixed In set to v19.3.0-7094-gcc96a380ab11

UB Updated by Upkeep Bot over 1 year ago Actions #11

  • Fixed In changed from v19.3.0-7094-gcc96a380ab11 to v19.3.0-7094-gcc96a380ab1
  • Upkeep Timestamp set to 2025-07-08T18:29:35+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #12

  • Fixed In changed from v19.3.0-7094-gcc96a380ab1 to v19.3.0-7094-gcc96a380ab
  • Upkeep Timestamp changed from 2025-07-08T18:29:35+00:00 to 2025-07-14T17:10:14+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #13

  • Released In set to v20.2.0~1276
  • Upkeep Timestamp changed from 2025-07-14T17:10:14+00:00 to 2025-11-01T01:27:41+00:00

UB Updated by Upkeep Bot 3 months ago Actions #14

  • Tags (freeform) deleted (backport_processed)
  • Upkeep Timestamp changed from 2025-11-01T01:27:41+00:00 to 2026-08-28T01:35:00+00:00
Actions

Also available in: PDF Atom