Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] rev 15286: /trunk/gtk/: capture_prefs.c co

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

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Thu, 11 Aug 2005 01:10:05 +0200
On Thu, Aug 11, 2005 at 12:46:42AM +0200, Ulf Lamping wrote:
> type we're probably out of luck :-(
> 
> I don't really know *why* gcc warns about this anyway.

Well, the intention is clear: Prevent the developer from making "wrong"
casts.

> Conclusion: I would love to see all these warnings disappear on every 
> compiler "we" use. I thought that I'd understand the problems on this 
> task, but unfortunately the gcc 4.x compiler has a different point of 
> view :-(

I've been thinking about that problem a while ago and decided that we
will have to live with that warning - at least until the libraries we
are using write const char* instead of char* wherever appropriate.
>From gcc's point of view we are doing a dangerous thing: what would
happen with a string being in a read only section of memory and one of
the functions we are calling tried to modify it? 

> I would really love to see someone with more knowledge than me could 
> spread some light to solve this topic?!?

As mentoined above: It's just a warning that we probably won't be able
to fix. It's something that needs to be fixed in gtk and maybe other
libs as well.

 ciao
 Joerg

-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.