--- Jennifer King <[EMAIL PROTECTED]> wrote:
> First question: I'm using some extended compile flags in my makefile to
> try to get rid of any potential problems, including -Wcast-qual and
> -Wcast-align, now, after hours of fixing things, I'm left with one warning
> message left (in different places). Does anyone know how to fix this? I've
> checked the mailing list archives and even tried finding things on the net
> about it, but all I could find was "Just remove that compile flag"
> 
> (Rom2.4b6+OLC2)
> 
> olc_act.c:3671: warning: cast discards qualifiers from pointer target type
> 
> info from olc_act:
> ED_FUN_DEC( ed_flag_toggle )
> {
>     int value;
> 
>     if( !emptystring( argument ) )
>     {
> 3671> if( ( value = flag_value( ( struct flag_type *) par, argument ) ) !=
> NO_FLAG )
>       {
>           *(long *) arg ^= value;
> ...
> ...
> ...

Are you compiling with g++ or gcc. g++ (being a c++ compilier) is a lot more
picky about what types of casts it'll let you get away with. Most likely this
warning is being caused by casting a const pointer into a non-const one. Stock
ROM does this in quite a few places, and it's not concidered to be very good
practice. Changing the casts to be (const char *) should do the trick for the
char *'s. And you should be able to adjust the other casts similiarly

> Second question:
> Using Ammaross' unlimited bit system, I have it compiling error-free,
> converting everything fine, working fine.. Except for one little (or not
> so little) problem.
> If a player casts a spell on themself, using sanctuary as an example,
> the spell gets cast, affects command shows:
> Spell: sanctuary      : modifies none by 0 for 7 hours
> which is correct. However.. if you stat that person, you see the
> following:
> Spell: 'sanctuary' modifies none by 0 for 7 hours with bits sanctuary
> faerie_fire infrared curse poison prot_evil prot_good berserk slow plague
> dark_vision, level 45.
> 
> Has anyone run into this problem before, or does anyone know how to fix
> this? I'm on day 2 of trying to figure it out and I'm getting close to the
> 'pulling out hair' stage.

I'm not familiar with this bit system, so I can't be much help there.


~Kender

=====
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ 
P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O 
M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ 
b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
------END GEEK CODE BLOCK------

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

Reply via email to