]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: silence GCC warnings
authorKefu Chai <kchai@redhat.com>
Wed, 18 Apr 2018 03:08:44 +0000 (11:08 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Apr 2018 07:10:54 +0000 (15:10 +0800)
commitc4f51c85df3ba2b20572159f4ebdacb29fe3d6ff
tree277b7f9261168f70ca1891283ab11204b197c537
parentfdbc1e6d7cff0a8e9e0c6dc42a077b4a9172e968
common: silence GCC warnings

Preforker.h:111:8: warning: ignoring return value of ‘ssize_t
safe_write(int, const void*, size_t)’, declared with attribute
warn_unused_result [-Wunused-result]
        (void)safe_write(fd[1], &r, sizeof(r));
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

compat.cc:36:28: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
     if (off + sizeof(data) > len)
         ~~~~~~~~~~~~~~~~~~~^~~~~

Fixes: http://tracker.ceph.com/issues/23774
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/Preforker.h
src/common/compat.cc