ceph plugin: fix implicit conversion warnings
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 1 Jun 2018 18:07:21 +0000 (20:07 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 1 Jun 2018 18:07:21 +0000 (20:07 +0200)
commit24cc8f5c9ad5961fcb0d163d4279d835aa3dd5cb
treef62092e7199d9cc12c3a4cdf0584391d424eeaa7
parentf650263a946b9d7a0dca786948df448d32ef1f9b
ceph plugin: fix implicit conversion warnings

  CC       src/ceph_la-ceph.lo
src/ceph.c:1160:14: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
        ret, write(io->asok, ((char *)&cmd) + io->amt, cmd_len - io->amt));
        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ceph.c:67:11: note: expanded from macro 'RETRY_ON_EINTR'
    ret = expr;                                                                \
        ~ ^~~~
src/ceph.c:1181:25: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    RETRY_ON_EINTR(ret, read(io->asok, ((char *)(&io->d->version)) + io->amt,
    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ceph.c:67:11: note: expanded from macro 'RETRY_ON_EINTR'
    ret = expr;                                                                \
        ~ ^~~~
src/ceph.c:1207:25: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
    RETRY_ON_EINTR(ret, read(io->asok, ((char *)(&io->json_len)) + io->amt,
    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ceph.c:67:11: note: expanded from macro 'RETRY_ON_EINTR'
    ret = expr;                                                                \
        ~ ^~~~
src/ceph.c:1229:20: warning: implicit conversion loses integer precision: 'ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
                   read(io->asok, io->json + io->amt, io->json_len - io->amt));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ceph.c:67:11: note: expanded from macro 'RETRY_ON_EINTR'
    ret = expr;                                                                \
        ~ ^~~~
src/ceph.c:1299:29: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
  int sec_diff = t1->tv_sec - t2->tv_sec;
      ~~~~~~~~   ~~~~~~~~~~~^~~~~~~~~~~~
src/ceph.c:1300:31: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
  int usec_diff = t1->tv_usec - t2->tv_usec;
      ~~~~~~~~~   ~~~~~~~~~~~~^~~~~~~~~~~~~
6 warnings generated.
  CCLD     ceph.la
src/ceph.c