From: "Robert Moynihan" <[EMAIL PROTECTED]> > Chris Tutty wrote: > >How on earth is this going to make any difference? Aside from > >the questionable approach of trying to eliminate a warning rather > >than fix the underlying problem, how would casting a variable > >defined as char * to char * change anything. > > > Actually, I did make a mistake. I meant to write (Char*) instead of > (char*).
Ahh. Fair point. > All 4 of these give the warning message: > char *s; > s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID)); (snip) > > These 2 don't: > char *s; > (Char*) s=CtlGetLabel(GetObjectPointer(DBTypeTriggerID)); > (snip) Now *that's* just bizarre. I agree with you, the last time I looked Char was just a typedef for char (although worth respecting as a diferent type since the intention is obviously to allow this to be different at some point, probably when using wide character sets) so it shouldn't make a difference. I agree that the cast syntax is a strange and confusing. My memory is that you can phrase casts in a number of different ways and although 'result = (type) something' is what I'm used to I think variations such as 'result = type (something)' are also valid so I guess the syntax you're using is also valid. The strange thing about the cast to a different type is that it still isn't const so the warning shouldn't disappear. Shrug. Chris Tutty -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
