kyz / libmspack

A library for some loosely related Microsoft compression formats, CAB, CHM, HLP, LIT, KWAJ and SZDD.
https://www.cabextract.org.uk/libmspack/
169 stars 45 forks source link

Compiler error with 1.9.1 / gcc 9.3.1 #37

Closed dilyanpalauzov closed 4 years ago

dilyanpalauzov commented 4 years ago

With gcc 9.3.1 20200506, compiling libmspack 1.9.1 prints:

  CC       mspack/oabd.lo
mspack/oabd.c:375:12: error: conflicting types for ‘copy_fh’
  375 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
mspack/oabd.c:37:12: note: previous declaration of ‘copy_fh’ was here
   37 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
mspack/oabd.c:37:12: warning: ‘copy_fh’ used but never defined
mspack/oabd.c:375:12: warning: ‘copy_fh’ defined but not used [-Wunused-function]
  375 | static int copy_fh(struct mspack_system *sys, struct mspack_file *infh,
      |            ^~~~~~~
make[1]: *** [Makefile:1071: mspack/oabd.lo] Error 1
dilyanpalauzov commented 4 years ago

copy_fh uses for bytes_to_copy in the declaration size_t, but in the definition unsigned int.

kyz commented 4 years ago

This was fixed in 817f2a2456809ebd50226002a6585852028abd9d.

I suspect the code you're compiling does not come from the https://www.cabextract.org.uk/libmspack/#download release page, but instead comes from the Github releases page, and then it is actually the cabextract release tag that was download, which is a slightly earlier snapshot of the repo than the most recent libmspack release tag

kyz commented 4 years ago

Duplicate of #33

dilyanpalauzov commented 4 years ago

Why shall somebody download code labelled alpha? When will 1.10 be released?

dilyanpalauzov commented 4 years ago

Do you install on your systems software with alpha versions?