[patch] const_cast to be replaced by str_unconst

Roland Illig roland.illig at gmx.de
Thu Apr 14 18:19:50 UTC 2005


Oswald Buddenhagen wrote:
> whoops, this is exactly what you're talking about. :}
> anyway, i don't think this extra warning would matter, given that it
> would be in the same location in every file.
> and, fwiw, isn't it possible to use a #pragma or some __attribute__ to
> get rid of the warning?

There's a fairly easy way to select between few warnings and the inlined 
function:

#define INLINE_STR_UNCONST

Just look at the current src/util.h

I have made non-inlining the default, for producing fewer warnings. For 
release (or non-developer) versions, we may #define INLINE_STR_UNCONST 
in <config.h> or in configure.ac, next to the -DNDEBUG.

Roland



More information about the mc-devel mailing list