AnsweredAssumed Answered

Error C1853:unary minus operator.......CW5.7 MC9s08RE16

Question asked by Steve Church on May 27, 2009
Latest reply on May 28, 2009 by Daniel Lundin

I have come up against this error while porting some drivers from another processor

 

C1853: unary minus operator applied to unsigned type

The line in question is:

 

if(offset < 0)

    bytes_to_new_posn -= (unsigned long)0 - offset;

 

bytes_to_new_posn is an unsigned long

offset is a long

 

How do I get round this?

 

Steve

Outcomes