Ethereal-dev: Re: [Ethereal-dev] Problems compiling ethereal 0.9.8 under MacOS X

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 8 Dec 2002 20:18:00 -0800
On Mon, Dec 09, 2002 at 01:16:36AM +0100, Michael Tuexen wrote:
> ld: epan/libethereal.a(to_str.o) literal C string section 
> (__TEXT,__cstring) does not end with a '\0'

A new routine "fc_to_str_buf()" was added to "to_str.c" in 0.9.8, and it
declares a "static const gchar" array of 16 elements, initialized to a
string "0123456789abcdef"; I'd have to see my ANSI C standard, which is
at work, to see whether

	static const gchar hex_digits[16] = "0123456789abcdef";

is illegal C (because "0123456789abcdef", as a string constant, is 17
bytes long, with the 17th byte being the terminating '\0'), so that
Apple can't be blamed for whining about that, or whether it's legal C
and Apple's C compiler should just shut up and stop whining.  (I suspect
the latter is the case - an array of "char" is *NOT* necessarily a C
string.)