mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
os/filestore: fix warning
os/filestore/FileStore.cc: In member function ‘int FileStore::_zero(const coll_t&, const ghobject_t&, uint64_t, size_t)’: os/filestore/FileStore.cc:3294:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (offset + len > st.st_size) { ^ Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
cae8d3c89c
commit
8b9ed00812
@ -3291,7 +3291,7 @@ int FileStore::_zero(const coll_t& cid, const ghobject_t& oid, uint64_t offset,
|
||||
ret = -errno;
|
||||
} else {
|
||||
// ensure we extent file size, if needed
|
||||
if (offset + len > st.st_size) {
|
||||
if (offset + len > (uint64_t)st.st_size) {
|
||||
ret = ::ftruncate(**fd, offset + len);
|
||||
if (ret < 0) {
|
||||
ret = -errno;
|
||||
|
Loading…
Reference in New Issue
Block a user