Wireshark-dev: [Wireshark-dev] size_t and gint in doc/README.developer?
From: Németh Márton <[email protected]>
Date: Wed, 28 Oct 2009 06:57:13 +0100

in the doc/README.developer, Chapter 1.1.1 Portability I read about the
usage of size_t and gint. Some examples and two possible way of
casting are shown. IMHO, at the second example the comment is wrong
because the casting seems to be valid. See the attached patch for exact


	Márton Németh
Index: doc/README.developer
--- doc/README.developer	(revision 30690)
+++ doc/README.developer	(working copy)
@@ -163,7 +163,7 @@
 	guint byte_after_greet;
 	i = (gint) strlen(greeting);
-	byte_after_greet = tvb_get_guint8(tvb, i); /* Compiler warning */
+	byte_after_greet = tvb_get_guint8(tvb, i); /* OK */
 See http://www.unix.org/version2/whatsnew/lp64_wp.html for more
 information on the sizes of common types in different data models.