From: Bernard Blackham Date: Sat, 16 Aug 2003 17:03:56 +0000 (+0000) Subject: Cleanup gcc compile warnings X-Git-Tag: ROMW~51 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=db23b975a50ba026e1455852f4b656f18095aeb3;p=uccvend-snackrom.git Cleanup gcc compile warnings --- diff --git a/ROM2/keypad.c b/ROM2/keypad.c index 8f50c19..cc6093d 100644 --- a/ROM2/keypad.c +++ b/ROM2/keypad.c @@ -28,7 +28,7 @@ extern inline u8 keypad_read_row(u8 row) { while(!(_io_ports[M6811_SPDR]&M6811_SPIE)); /* wait for completion */ for (i = _io_ports[M6811_SPDR], num = 0; - (i&0x1 == 0) && (num < 7); + ((i&0x1) == 0) && (num < 7); i=i>>1, num++); return num; @@ -41,7 +41,7 @@ void keypad_read() { key = keypad_read_row(0); if (NO_KEY == key) { key = keypad_read_row(1); - if (key >= 0 && key <= 2) + if (key <= 2) key = keymap1[key]; else key = 0;