Raphael Manfredi wrote:
> :kmsg.c: In function âk_send_find_value_responseâ:
> :kmsg.c:626: warning: format â%dâ expects type âintâ, but argument 4
> has
> :type âsize_tâ
> :kmsg.c:626: warning: format â%dâ expects type âintâ, but argument 5
> has
> :type âsize_tâ
On 32-bit architectures where GCC doesn't complain about such bugs,
the attached patch can be used for test-compiling to expose them.
Of course, the compiled binary cannot be used.
--
Christian
Index: src/common.h
===================================================================
--- src/common.h (revision 15886)
+++ src/common.h (working copy)
@@ -676,6 +676,11 @@ get_rcsid_string(void) \
#include "casts.h"
+#undef size_t
+#define size_t uint64_t
+#undef ssize_t
+#define ssize_t int64_t
+
#endif /* _common_h_ */
/* vi: set ts=4 sw=4 cindent: */
Index: src/main.c
===================================================================
--- src/main.c (revision 15886)
+++ src/main.c (working copy)
@@ -1315,8 +1315,8 @@ main(int argc, char **argv)
* Gtk+ 1.2 and GLib 1.2 are not 64-bit clean, thus must not be
* used on 64-bit architectures.
*/
- STATIC_ASSERT(sizeof(size_t) == sizeof(gsize));
- STATIC_ASSERT(sizeof(ssize_t) == sizeof(gssize));
+//XXX STATIC_ASSERT(sizeof(size_t) == sizeof(gsize));
+//XXX STATIC_ASSERT(sizeof(ssize_t) == sizeof(gssize));
STATIC_ASSERT(UNSIGNED(INT_MIN) > 0);
STATIC_ASSERT(UNSIGNED(LONG_MIN) > 0);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gtk-gnutella-devel mailing list
gtk-gnutella-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel