[analog-help] png.c and ioapi.c won't compile under AIX

Stephen Turner analog-author at lists.meer.net
Sat Sep 16 01:47:55 PDT 2006


On 15/09/06, Sara Michale Smith <smith_sara at wheatoncollege.edu> wrote:
> Hi,
> I am trying to compile analog 6.0 on our IBM webserver. It is AIX
> version 5.3 with the IBM XL C Compiler version 7.0.0.6.  Most of the
> files compile, but png.c and ioapi.c do not.  Here are the errors.  Any
> ideas?
>
> Thanks!
> -- Sara
>
>         cd libpng && make         'CC=cc            '
> 'ALLCFLAGS=-O2      -DUNIX         '
>         cc             -O2      -DUNIX           -c png.c
> "png.c", line 153.21: 1506-280 (W) Function argument assignment between
> types "unsigned char*" and "struct png_struct_def*" is not allowed.
> "png.c", line 153.38: 1506-280 (W) Function argument assignment between
> types "unsigned char*" and "struct png_color_struct*" is not allowed.
>
>
>         cd unzip && make         'CC=cc            ' 'ALLCFLAGS=-O2
> -DUNIX         '
>         cc             -O2      -DUNIX           -c ioapi.c
> "ioapi.c", line 86.12: 1506-068 (W) Operation between types "unsigned
> char*" and "struct {...}*" is not allowed.
>
>

That's bizarre. I've never seen that error. And as those files are
both from very widely-used third-party code, it must be very rare.

It looks as if it's refusing to coerce one type of pointer into a
different type, which should certainly be allowed. I can't promise it
will work, but I would try putting (void *) before the arguments it's
complaining about; e.g., in png.c line 153
  png_zfree((void *)png_ptr, (void *)info_ptr->palette);

-- 
Stephen Turner


More information about the analog-help mailing list