Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

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: "Esh, Andrew" <AEsh@xxxxxxxxxxx>
Date: Mon, 9 Dec 2002 17:01:58 -0600
Title: RE: [Ethereal-dev] Problems compiling ethereal 0.9.8 under MacOS X

No, that would be silly, since what you are really working with there is a string, and storage size is being left to the compiler. But what if you screwed up and did this?

        char password_file_pathname[11] = "/etc/passwd";

You could be days finding out what's wrong, unless the compiler yells about it. The code could be trying to write or create that file, and you'd keep getting one that the system won't recognize, because the filename has garbage at the end. Let's hope that garbage isn't made up entirely out of spaces, or it would be a real hair puller.

I this problem should be a compiler warning, though, not an error.


-----Original Message-----
From: Guy Harris [mailto:guy@xxxxxxxxxx]
Sent: Monday, December 09, 2002 3:38 PM
To: Esh, Andrew
Cc: ethereal-dev@xxxxxxxxxxxx
Subject: Re: [Ethereal-dev] Problems compiling ethereal 0.9.8 under
MacOS X


On Mon, Dec 09, 2002 at 03:16:40PM -0600, Esh, Andrew wrote:
> I was trying to point out that a character array should be initialized
> with an array of characters.

As in

        char password_file_pathname[] = { '/', 'e', 't', 'c', '/',
            'p', 'a', 's', 's', 'w', 'd', '\0' };

? :-)