[arch-dev-public] wesnoth issue with png

Daniel Isenmann daniel.isenmann at gmx.de
Fri Jan 22 05:34:32 EST 2010


-------- Original-Nachricht --------
> Datum: Fri, 22 Jan 2010 11:27:16 +0100
> Von: Tobias Powalowski <t.powa at gmx.de>
> An: Public mailing list for Arch Linux development <arch-dev-public at archlinux.org>
> Betreff: Re: [arch-dev-public] wesnoth issue with png

> Am Freitag 22 Januar 2010 schrieb Daniel Isenmann:
> > -------- Original-Nachricht --------
> > 
> > > Datum: Fri, 22 Jan 2010 11:18:35 +0100
> > > Von: "Daniel Isenmann" <daniel.isenmann at gmx.de>
> > > An: Public mailing list for Arch Linux development
> > > <arch-dev-public at archlinux.org> Betreff: Re: [arch-dev-public] wesnoth
> > > issue with png
> > >
> > >
> > > -------- Original-Nachricht --------
> > >
> > > > Datum: Fri, 22 Jan 2010 11:10:02 +0100
> > > > Von: Tobias Powalowski <t.powa at gmx.de>
> > > > An: Public mailing list for Arch Linux development
> > >
> > > <arch-dev-public at archlinux.org>
> > >
> > > > Betreff: [arch-dev-public] wesnoth issue with png
> > > >
> > > > Hi guys need some help on wesnoth,
> > > > tools/exploder_utils.cpp: In function 'void save_image(surface,
> const
> > > > std::string&)':
> > > > tools/exploder_utils.cpp:177: error: 'png_voidp_NULL' was not
> declared
> > >
> > > in
> > >
> > > > this
> > > > scope
> > > > tools/exploder_utils.cpp:178: error: 'png_error_ptr_NULL' was not
> > >
> > > declared
> > >
> > > > in
> > > > this scope
> > > > make[2]: *** [tools/exploder_utils.o] Error 1
> > > >
> > > > affected codepart:
> > > > 	png_struct* png_ptr = png_create_write_struct
> > > > 		(PNG_LIBPNG_VER_STRING, (png_voidp)png_voidp_NULL,
> > > > 		 png_error_ptr_NULL, png_error_ptr_NULL);
> > > >
> > > >
> > > > snip from changelog of 1.4 libpng
> > > >    b. We removed the typecasted NULL definitions such as
> > > >
> > > >           #define png_voidp_NULL    (png_voidp)NULL
> > > >
> > > >       If you used these in your application, just use NULL instead.
> > > >
> > > > so what should i add?
> > > >
> > > > thanks
> > > > greetings
> > > > tpowa
> > >
> > > Just what the changelog say, use NULL. So change the method to:
> > >
> > > png_struct* png_ptr = png_create_write_struct
> > > 		(PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
> > > 		 png_error_ptr_NULL, png_error_ptr_NULL);
> > >
> > > Maybe you have to change "the png_error_ptr_NULL" to NULL also.
> > >
> > >
> > >  Daniel
> > 
> > Was there something mentioned about the "png_error_ptr_NULL" in the
> >  changelog? Because this is also affected. I have overseen the error
> >  message from the compiler for it.
> > 
> no, no mention about it setting to NULL makes it compile though.

Yeah, that's for sure. Both "png_error_ptr_NULL" are pointers and pointers can be NULL. So compilation works. But if they are something special (which I don't believe, because they have NULL in their names) it can crash.

I don't think it's a good idea to set both just to NULL. I can have a closer look into the sourcecode this evening at home and maybe can give you the right answer.

 Daniel
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser


More information about the arch-dev-public mailing list