]> sigrok.org Git - libsigrokdecode.git/commitdiff
irmp: silence signedness compiler warning in IR command comparison
authorGerhard Sittig <redacted>
Sat, 22 Feb 2020 05:32:40 +0000 (06:32 +0100)
committerGerhard Sittig <redacted>
Sat, 18 Jul 2020 13:25:29 +0000 (15:25 +0200)
Assume that IR command codes can get represented by a C language 'int'
data type. The other value in the comparison is another 'int' anyway.

irmp/irmp.c

index 25f8def49c9db29d8a04b30cbc407183ee7a45b2..f2e7f5ade2fe530cfd5b8bf5db9aaa538a104630 100644 (file)
@@ -5870,7 +5870,7 @@ next_tick (void)
             {
                 if (irmp_data.protocol != expected_protocol ||
                     irmp_data.address  != expected_address  ||
-                    irmp_data.command  != expected_command)
+                    (int)irmp_data.command  != expected_command)
                 {
                     printf ("\nerror 7: expected values differ: p=%2d (%s), a=0x%04x, c=0x%04x\n",
                             expected_protocol, irmp_protocol_names[expected_protocol], expected_address, expected_command);