evo-lua / evo-luvi

[Obsolete] Experimental Lua runtime environment built on Luvi (libuv + LuaJIT)
https://evo-lua.github.io
Apache License 2.0
1 stars 0 forks source link

Fix compilation warnings in the miniz binding #148

Open rdw-software opened 1 year ago

rdw-software commented 1 year ago

They've been there a long time, so clearly it's not exactly critical. Anyway, it's a minor annoyance to frequently see this:

[51/52] Compiling Runtime/main.c ...
In file included from Runtime/main.c:26:
Runtime/Bindings/lminiz.c: In function 'lmz_compress':
Runtime/Bindings/lminiz.c:420:34: warning: passing argument 2 of 'mz_compress2' from incompatible pointer type [-Wincompatible-pointer-types]
  420 |         ret = mz_compress2(outb, &out_len, inb, in_len, level);
      |                                  ^~~~~~~~
      |                                  |
      |                                  size_t * {aka long long unsigned int *}
In file included from Runtime/Bindings/lminiz.c:20:
Runtime/Bindings/../../deps/miniz.c:310:50: note: expected 'mz_ulong *' {aka 'long unsigned int *'} but argument is of type 'size_t *' {aka 'long long unsigned int *'}
  310 | int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level)
      |                                        ~~~~~~~~~~^~~~~~~~~
Runtime/Bindings/lminiz.c: In function 'lmz_uncompress':
Runtime/Bindings/lminiz.c:450:43: warning: passing argument 2 of 'mz_uncompress' from incompatible pointer type [-Wincompatible-pointer-types]
  450 |                 ret = mz_uncompress(outb, &out_len, inb, in_len);
      |                                           ^~~~~~~~
      |                                           |
      |                                           size_t * {aka long long unsigned int *}
Runtime/Bindings/../../deps/miniz.c:550:51: note: expected 'mz_ulong *' {aka 'long unsigned int *'} but argument is of type 'size_t *' {aka 'long long unsigned int *'}
  550 | int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len)
      |                                         ~~~~~~~~~~^~~~~~~~~