Ethereal-dev: Re: [Ethereal-dev] Other signed/unsigned warnings we can avoid

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 19 Jan 2004 14:53:40 -0800

On Jan 19, 2004, at 2:49 PM, Olivier Biot wrote:

While we're at it, why couldn't we modify the functions returning a
string of characters to return "gchar *" instead of "guint8 *"?

We could, but note that if you're extracting a character from a string pointed to by a "gchar *" and using one of the "is...()" macros on it, you'd have to cast the character to "guchar" first, so that the byte from the string doesn't get sign-extended (well, so that the sign extension gets discarded, but I think most compilers would be clever enough to avoid the sign extension if possible).