AnsweredAssumed Answered

C1857 Warning Access out of range

Question asked by huck lim on Mar 26, 2014
Latest reply on Mar 27, 2014 by huck lim

Hello everyone,

When I compile my program using Codewarrior version 5.1, I get the following warning:


"Warning : C1857: Access out of range

MAIN_Func.c line 62"


Here is MAIN_Func.c line 62:


position_value[2] = (byte)(dw_DecXPosition & 0x000000FF);


position_value[2] is declared as byte, and dw_DecXPosition is declared as double word.


I was wondering, if anyone can tell me how to 'improve' the above instruction, so that I would not get this Access out or range warning?


Yours sincerely,