kc9dag wrote: > I am getting: > wirelessmouse.c:213: warning: comparison is always true due to limited > range of data type > > for the line: > if ((byte_index >=0) && (byte_index < 8)) > > where byte_index is delared as: > unsigned char byte_index; Unsigned values are always a positive integer number so the expression "byte_index >=0" always evaluates to true. You could eliminate this code. The question is why was this condition there in the first place? For example values for a unsigned char that are >128 could be consider negative numbers. Mike http://home.austin.rr.com/perks/micros/
Message
Re: [AVR-Chat] What does this gcc compiler warning mean?
2006-02-25 by Mike Perks