Wireshark mailing list archives
size_t and gint in doc/README.developer?
From: Németh Márton <nm127 () freemail hu>
Date: Wed, 28 Oct 2009 06:57:13 +0100
Hi, 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 location. Regards, 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.
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- size_t and gint in doc/README.developer? Németh Márton (Oct 27)
- Re: size_t and gint in doc/README.developer? Guy Harris (Oct 28)
- Re: size_t and gint in doc/README.developer? Guy Harris (Oct 30)
- Re: size_t and gint in doc/README.developer? Guy Harris (Oct 28)