From e5c5de925534ce4ddbba967b5f8984e6627651b1 Mon Sep 17 00:00:00 2001 From: Rafael Silva Date: Fri, 28 Jul 2023 18:29:39 +0100 Subject: [PATCH] morse: fix binary constant pedantic warning binary constants are a GCC extension --- src/morse.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/morse.c b/src/morse.c index c151e6e634b..4758d6bf555 100644 --- a/src/morse.c +++ b/src/morse.c @@ -27,32 +27,32 @@ typedef struct { } morse_char_s; static const morse_char_s morse_char_lut[] = { - {0b0000000000011101, 8}, // 'A' .- - {0b0000000101010111, 12}, // 'B' -... - {0b0000010111010111, 14}, // 'C' -.-. - {0b0000000001010111, 10}, // 'D' -.. - {0b0000000000000001, 4}, // 'E' . - {0b0000000101110101, 12}, // 'F' ..-. - {0b0000000101110111, 12}, // 'G' --. - {0b0000000001010101, 10}, // 'H' .... - {0b0000000000000101, 6}, // 'I' .. - {0b0001110111011101, 16}, // 'J' .--- - {0b0000000111010111, 12}, // 'K' -.- - {0b0000000101011101, 12}, // 'L' .-.. - {0b0000000001110111, 10}, // 'M' -- - {0b0000000000010111, 8}, // 'N' -. - {0b0000011101110111, 14}, // 'O' --- - {0b0000010111011101, 14}, // 'P' .--. - {0b0001110101110111, 16}, // 'Q' --.- - {0b0000000001011101, 10}, // 'R' .-. - {0b0000000000010101, 8}, // 'S' ... - {0b0000000000000111, 6}, // 'T' - - {0b0000000001110101, 10}, // 'U' ..- - {0b0000000111010101, 12}, // 'V' ...- - {0b0000000111011101, 12}, // 'W' .-- - {0b0000011101010111, 14}, // 'X' -..- - {0b0001110111010111, 16}, // 'Y' -.-- - {0b0000010101110111, 14}, // 'Z' --.. + {0x001dU, 8U}, // 'A' .- 0b0000000000011101 + {0x0157U, 12U}, // 'B' -... 0b0000000101010111 + {0x05d7U, 14U}, // 'C' -.-. 0b0000010111010111 + {0x0057U, 10U}, // 'D' -.. 0b0000000001010111 + {0x0001U, 4U}, // 'E' . 0b0000000000000001 + {0x0175U, 12U}, // 'F' ..-. 0b0000000101110101 + {0x0177U, 12U}, // 'G' --. 0b0000000101110111 + {0x0055U, 10U}, // 'H' .... 0b0000000001010101 + {0x0005U, 6U}, // 'I' .. 0b0000000000000101 + {0x1dddU, 16U}, // 'J' .--- 0b0001110111011101 + {0x01d7U, 12U}, // 'K' -.- 0b0000000111010111 + {0x015dU, 12U}, // 'L' .-.. 0b0000000101011101 + {0x0077U, 10U}, // 'M' -- 0b0000000001110111 + {0x0017U, 8U}, // 'N' -. 0b0000000000010111 + {0x0777U, 14U}, // 'O' --- 0b0000011101110111 + {0x05ddU, 14U}, // 'P' .--. 0b0000010111011101 + {0x1d77U, 16U}, // 'Q' --.- 0b0001110101110111 + {0x005dU, 10U}, // 'R' .-. 0b0000000001011101 + {0x0015U, 8U}, // 'S' ... 0b0000000000010101 + {0x0007U, 6U}, // 'T' - 0b0000000000000111 + {0x0075U, 10U}, // 'U' ..- 0b0000000001110101 + {0x01d5U, 12U}, // 'V' ...- 0b0000000111010101 + {0x01ddU, 12U}, // 'W' .-- 0b0000000111011101 + {0x0757U, 14U}, // 'X' -..- 0b0000011101010111 + {0x1dd7U, 16U}, // 'Y' -.-- 0b0001110111010111 + {0x0577U, 14U}, // 'Z' --.. 0b0000010101110111 }; volatile const char *morse_msg = NULL;