Menu

#45 Doesn't compile: error in ratio.c

v1.0 (example)
open
None
7
2015-09-19
2014-04-24
RoBorg
No
ratio.c:25: error: conflicting types for opng_longest_impl_t
ratio.c:24: error: previous declaration of opng_longest_impl_t was here

Line 25 should have "opng_ulongest_impl_t" not "opng_longest_impl_t"

Discussion

  • Cosmin Truta

    Cosmin Truta - 2014-04-25

    You are correct, thank you for your report.

    Out of curiosity, which compiler/platform are you using? That piece of code is enabled only if a 64-bit integer type is not assumed to exist. Is that indeed the case?

     
  • Ryan

    Ryan - 2014-07-02

    I'm running into the same thing

    Linux cld01-devops01 2.6.18-308.4.1.el5xen #1 SMP Tue Apr 17 17:49:15 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
    gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)
    
     
  • Cosmin Truta

    Cosmin Truta - 2014-08-27

    This seems to be happening when the compiler runs in C89 mode by default. As a workaround, enable the C99 mode (plus the POSIX extensions), e.g. by adding "-std=gnu99" to CFLAGS.

     
  • Till Maas

    Till Maas - 2015-09-19

    Here is also a patch for this: https://sourceforge.net/p/optipng/patches/7/

     

Log in to post a comment.

Auth0 Logo