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

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.0.0alpha9
    • Fix Version/s: 4.0.2rc1, 4.2.0alpha1, 4.2 (plan)
    • Component/s: Proxy (P), Server (S)
    • Labels:
      None
    • Environment:
      Debian GNU/Linux, 32-bit, GCC-5, GCC-8.1
    • Team:
      Team A
    • Sprint:
      Sprint 40, Sprint 41, Sprint 42, Sprint 45, Sprint 46, Nov 2018
    • Story Points:
      0.25

      Description

      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,
       ^
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: