Cleanup gcc compile warnings
authorBernard Blackham <[email protected]>
Sat, 16 Aug 2003 17:03:56 +0000 (17:03 +0000)
committerBernard Blackham <[email protected]>
Sat, 16 Aug 2003 17:03:56 +0000 (17:03 +0000)
ROM2/keypad.c

index 8f50c19..cc6093d 100644 (file)
@@ -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;

UCC git Repository :: git.ucc.asn.au