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:
Sage Weil 2016-03-18 10:16:49 -04:00
parent cae8d3c89c
commit 8b9ed00812

View File

@ -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;