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: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Thu, 11 Aug 2005 00:46:42 +0200
Joerg Mayer wrote:

Well, it's not that bad. It's just that in several places I now get a
warning: assignment discards qualifiers from pointer target type
But it's debatable whether the previous "fix" was any better.
Huh, that's beginning to get though...

If gcc 4 tends to warn about pointer casts which *may* discard target type we're probably out of luck :-(

I don't really know *why* gcc warns about this anyway.

When I do a cast, I probably *intended* to cast from e.g. "const gchar *" to "gchar *" as that's what the whole cast is all about. Warning about a cast which *might* be wrong is odd to my eyes, as that's what a cast is about (to tell the compiler what the developer intends to do).

If a var is defined as:

const gchar * whatever;

and a call to a GTK1.x functions requires a "gchar *" what could you do anyway?


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 would really love to see someone with more knowledge than me could spread some light to solve this topic?!?

Regards, ULFL