swftools icon indicating copy to clipboard operation
swftools copied to clipboard

Clean compilation warnings

Open udif opened this issue 7 years ago • 3 comments

Here is a set of patches that clear all warnings from the original project code. I haven't cleaned LAME and XPDF warnings because obviously this is external code. I see that LAME is forked from 2009 and not modified. I also notice that only a small part of LAME is used. However, given http://www.cvedetails.com/product/37540/Lame-Project-Lame.html?vendor_id=16451 Perhaps this should get updated as well. I left the changes as individual commits so you can checrry-pick each one individually if you feel so. I am also not in a position to run an extensive test on all thse changes, esp. those affecting printf() format strings.
You also need to rebuild ./configure as my local system has autoconf 2.69 installed vs 2.68 as used in the lastest git version and the output is very different.

My build system for this change is Ubuntu 16.04 (64 bit) so this probably triggers some warnings not seen on 32 bit systems, esp. in printf() format string changes. (In fact, I'm really running it on Windows 10 Linux subsystem, not a real Ubuntu system, but it is effectively a genuine command line Ubuntu on the user level).

udif avatar Oct 20 '17 06:10 udif

From mandatory fixes to those that are not, various levels of commits are there. I think that it's easier to review if you separate the PR. There are some fixes I want, so hopefully they will be merged as needed.

yoya avatar Jan 16 '20 07:01 yoya

My point of view, this PR can be divided into the following PRs.

We can merge it without doubt.

  • The print format types mismatch. (& little more fix)

    • https://github.com/matthiaskramm/swftools/pull/44/commits/6a9c9afda67127dac8999964116d6418dfce2c33
    • https://github.com/matthiaskramm/swftools/pull/44/commits/b12f6f00cf385d17b639aae47dcd57d210956fe8
    • https://github.com/matthiaskramm/swftools/pull/44/commits/af304c1880cbbf663265a342af4752db2c82a159 (& little more fix)
    • https://github.com/matthiaskramm/swftools/pull/44/commits/56c7c216ede257ec7cb3aa3adc57bbfa0ed1d9d0
  • Compile popplercompat.cc using the C++ compiler, not the C compiler.

    • https://github.com/matthiaskramm/swftools/pull/44/commits/50914eb2ded1f05eb6387460714a8aa30893e810
  • C compiler supports -Wimplicit in but not C++

    • https://github.com/matthiaskramm/swftools/pull/44/commits/9c9ff2f77e032b1ccbe80caa9edd5d3f3a20d94b
  • Fixed warning due to missing gfxdevice_dummy_init declaration.

    • https://github.com/matthiaskramm/swftools/pull/44/commits/039e0563af263d258411c000697694eb63a7457d

We need to do a little review

  • Rewriting of reader_t & wrtier_t from void * to union

    • https://github.com/matthiaskramm/swftools/pull/44/commits/fd32e9eaad203fdf6aa65e6e1629c343ac4f7974
    • https://github.com/matthiaskramm/swftools/pull/44/commits/46597eb342c12afa4922fb7637f3dcfa068a81c4

I don't know if we need to merge it

  • Fixed warnings by checking fread() and fwrite() return values

    • https://github.com/matthiaskramm/swftools/pull/44/commits/a6a497985f07f82b9d55b822cc9be30952a9c6e5

yoya avatar Jan 22 '20 11:01 yoya