![]() | |||||||||||||
Messages in this thread |
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fom
it-frame-pointer -pipe -fno-strength-reduce -m486 -malig
n-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=586 -c -o ide-cd.o
ide-cd.c
ide-cd.c: In function `cdrom_analyze_sense_data':
ide-cd.c:275: warning: comparison is always 1 due to limited range of data
type
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fom
it-frame-p
275:
if (reqbuf->sense_key >= 0 &&
reqbuf->sense_key < ARY_LEN (sense_key_texts))
sense_key is:
unsigned char sense_key : 4;
Should the code be (to force it to an int):
if (reqbuf->sense_key & 0x0f >= 0 &&
reqbuf->sense_key < ARY_LEN (sense_key_texts))
This does clear up the warning.
| ||||||||||||
| Last update: 2005-03-22 12:41 [W:0.054 / U:0.040 seconds] ©2003-2008 Jasper Spaans | |||||||||||||