Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465780 - media-gfx/apngasm-2.7: Severe warnings during compilation with libpng-1.6.1
Summary: media-gfx/apngasm-2.7: Severe warnings during compilation with libpng-1.6.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: libpng16
  Show dependency tree
 
Reported: 2013-04-13 13:28 UTC by Richard Grenville
Modified: 2013-04-13 14:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Grenville 2013-04-13 13:28:23 UTC
After upgrade to libpng-1.6.1, compiling apngasm-2.7 triggers severe warnings:

----
apngasm.c: In function ‘LoadPNG’:
apngasm.c:141:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled 
by default]
           memcpy(pInfo->pl, palette, pInfo->ps * 3);
           ^
apngasm.c: In function ‘LoadTGA’:
apngasm.c:345:19: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled 
by default]
                   memset(row_ptr+i, col[0], n);
                   ^
apngasm.c: In function ‘get_rect’:
apngasm.c:554:7: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
       memcpy(pc, &c2, 3);
       ^

# And a lot of similar warnings...
----

This sounds like a very bad thing. Compiler frequently can't pass parameters correctly if the function prototype is missing, right?

Apparently it's caused by the removal of "#include <string.h>" within "png.h" in libpng-1.6. Adding "#include <string.h>" to apngasm.c fixes the issue here:

----
sed -i 's/#include "png.h"/#include <string.h>\n\0/' "${S}/apngasm.c" || die
----

Within my brief test patched apngasm-2.7 is working correctly.

In theory this should go to upstream, but I doubt if the upstream of apngasm is still alive... Anyway, I did report this to upstream < https://sourceforge.net/projects/apngasm/forums/forum/1151026/topic/7544333 >.


Reproducible: Always
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2013-04-13 14:30:19 UTC
thanks for the fix. in portage for 2.7