"Undefined" printf behavior on some OSes

Paul P Komkoff Jr <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization Department of Fish & Wildlife
Message-ID <[email protected]>
Hi.

In couple of places, in gw/wml_compiler.c we are calling error with %s
format and xmlGetCharEnc-blablabla which should return char*
textual description of encoding value. Actualy, we are calling this
earlier too and passing result as an argument to convert_charset.
convert_charset is fine with null pointer (just returns -1), but then
we passing that null to printf.

On my glibc linux it works ok. But solaris manual says that behavior
is "undefined" and, actually, segfaults.

So, to avoid future confusion, I suggest replacing that debug printfs
with something more portable or kill that at all, which I did here,
Works fine right now.

-- 
Paul P 'Stingray' Komkoff Jr // http://stingr.net/key <- my pgp key
 This message represents the official view of the voices in my head
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.