Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

What does this gcc compiler warning mean?

2006-02-25 by kc9dag

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;


This was taken from someone elses "working" code, but I have just
spent the past 4 hours rewriting large sections because they simply
would not compile (it said that it was written for winavr, but I'm
thinking that it must have been for a different compiler due to all
the syntax errors.)  I have finally gotten it to compile but I have
several of these identical warnings remaining.

Someone please help me,
    Daniel

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.