Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-14505

compiler warning "incompatible pointer type" on 32-bit platform

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.0.2rc1, 4.2.0alpha1, 4.2 (plan)
    • 4.0.0alpha9
    • Proxy (P), Server (S)
    • None
    • Debian GNU/Linux, 32-bit, GCC-5, GCC-8.1
    • Sprint 40, Sprint 41, Sprint 42, Sprint 45, Sprint 46, Nov 2018
    • 0.25

      compress.c:37:13: warning: no previous prototype for ‘zbx_compress_strerror’ [-Wmissing-prototypes]
       const char *zbx_compress_strerror(void)
       ^
      compress.c:81:5: warning: no previous prototype for ‘zbx_compress’ [-Wmissing-prototypes]
       int zbx_compress(const char *in, size_t size_in, char **out, size_t *size_out)
       ^
      compress.c: In function ‘zbx_compress’:
      compress.c:86:64: warning: passing argument 2 of ‘compress’ from incompatible pointer type [-Wincompatible-pointer-types]
       if (Z_OK != (zbx_zlib_errno = compress((unsigned char *)*out, size_out, (const unsigned char *)in, size_in)))
       ^
      In file included from compress.c:24:0:
      /usr/include/zlib.h:1227:21: note: expected ‘uLongf * \{aka long unsigned int *}’ but argument is of type ‘size_t * \{aka unsigned int *}’
       ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
       ^
      compress.c: At top level:
      compress.c:110:5: warning: no previous prototype for ‘zbx_uncompress’ [-Wmissing-prototypes]
       int zbx_uncompress(const char *in, size_t size_in, char *out, size_t *size_out)
       ^
      compress.c: In function ‘zbx_uncompress’:
      compress.c:112:65: warning: passing argument 2 of ‘uncompress’ from incompatible pointer type [-Wincompatible-pointer-types]
       if (Z_OK != (zbx_zlib_errno = uncompress((unsigned char *)out, size_out, (const unsigned char *)in, size_in)))
       ^
      In file included from compress.c:24:0:
      /usr/include/zlib.h:1265:21: note: expected ‘uLongf * \{aka long unsigned int *}’ but argument is of type ‘size_t * \{aka unsigned int *}’
       ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
       ^
      

            MVekslers Michael Veksler
            andris Andris Mednis
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: