Is there some setting in CW to disable arithmetic conversion warnings when indexing in to arrays with unsigned shorts vs. signed shorts?

If I write the following code.
UInt16 index = 3;

UInt32 myArray[ 500 ];

myArray[ index ] = 10;

I get a warning message about arithmetic conversion from unsigned short to short.

It would seem to me that it would be better practice to allow unsigned indexes vs. signed indexes.

Now, all my code looks like this.

myArray[ ( Int16 )index ] = 10;

I imagine there is no way to disable the warning for just this scenario. Maybe this is more a gripe post than anything else.

~Brad


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to