Project

General

Profile

Actions

Bug #68552

closed

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

Added by Casey Bodley over 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% 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):
backport_processed
Fixed In:
v19.3.0-7094-gcc96a380ab
Released In:
v20.2.0~1276
Upkeep Timestamp:
2025-11-01T01:27:41+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 open1 closed)

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

Updated by Venky Shankar over 1 year ago

  • 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
Actions #2

Updated by John Mulligan over 1 year ago

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
Actions #3

Updated by Joseph Mundackal about 1 year ago

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

Assigning to Adam since he has a PR (https://github.com/ceph/ceph/pull/60986) open to fix this issue

Actions #4

Updated by Adam Emerson about 1 year ago

  • Pull request ID changed from 60986 to 61327
Actions #5

Updated by Adam Emerson about 1 year ago

  • Status changed from New to Fix Under Review
Actions #6

Updated by Venky Shankar about 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #7

Updated by Upkeep Bot about 1 year ago

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

Updated by Upkeep Bot about 1 year ago

  • Tags (freeform) set to backport_processed
Actions #9

Updated by Adam Emerson about 1 year ago

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

Updated by Patrick Donnelly 9 months ago

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

Updated by Upkeep Bot 9 months ago

  • 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
Actions #12

Updated by Upkeep Bot 8 months ago

  • 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
Actions #13

Updated by Upkeep Bot 5 months ago

  • 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
Actions

Also available in: Atom PDF