GNOME Bugzilla – Bug 766839
Format / argument mismatches to printf()-like functions
Last modified: 2016-10-12 11:37:06 UTC
Created attachment 328439 [details] Match up printf() format specifiers with argument types by adding casts At least on my platform, gcc ends up being configured to build libxml2 using C90. In C90, the %z format specifier which matches size_t is not available. On platforms where size_t is not the same underlying type as "unsigned long", this will cause needless warnings. The attached patch fixes this problem by adding casts so that the type of the argument matches the printf() format specifiers. (There is one cast which isn't related to size_t, rather, gcc claims that the result is "unsigned int" while the format specifies "unsigned long", it got dragged along for the ride.)
Fixed with the following commit: https://git.gnome.org/browse/libxml2/commit/?id=c2545cbb6d9a87e3e0bce167eabcb8f3c9153edc