From 8b9ed00812315623ad8a0ed97205a24959cbfcc1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 18 Mar 2016 10:16:49 -0400 Subject: [PATCH] os/filestore: fix warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/os/filestore/FileStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 24f7431c85e..6677c86dc4b 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -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;