Giter Site home page Giter Site logo

Comments (3)

kyz avatar kyz commented on May 31, 2024

copy_fh is defined the same way in its prototype and its implementation: static int copy_fh(struct mspack_system *, struct mspack_file *, struct mspack_file *, size_t, unsigned char *, int)

It is called with the fourth parameter being unsigned int rather than size_t. As size_t is the same or higher rank than unsigned int, and both are unsigned, it should be promoted to size_t without warning or error.

Please supply the error output by gcc, and also supply the output of changing "gcc -c" (compile) to "gcc -E" (preprocessor output) so that the definition of size_t is revealed.

from libmspack.

dilyanpalauzov avatar dilyanpalauzov commented on May 31, 2024

The declaration of copy_fh is on line 38 and the definition is on line 377. The declaration and definitions are not the same, gcc complains with

  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
make[1]: Leaving directory '/src/mail/libmspack-1.9.1/libmspack'
make: *** [Makefile:718: all] Error 2

The preprocessed output

from libmspack.

kyz avatar kyz commented on May 31, 2024

OK, you are using an outdated libmspack. This was fixed in 817f2a2 and released in libmspack v0.10.1alpha.

I believe this happened: you skipped the README on the front of the repository, went to the "releases" page and clicked whatever was first in the list. This gave you a snapshot of the repository for cabextract v1.9.1, and did not give you a snapshot of the repository for libmspack* v0.10.1alpha, which is what you need, if for some reason you don't want to go to https://www.cabextract.org.uk/libmspack/ where libmspack is actually released.

Solution: Read the README and obtain libmspack from https://www.cabextract.org.uk/libmspack/

If you are doing packaging for a distro, please ensure https://www.cabextract.org.uk/libmspack/ is where the package comes from, not a third party such as GitHub.

from libmspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.