From 1efc52d414887d568e9af709795169ae0e3f8cc4 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 5 Jul 2019 11:39:10 +0200 Subject: Suppress warning in cw.c --- src/common/Audio/cw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/common/Audio') diff --git a/src/common/Audio/cw.c b/src/common/Audio/cw.c index e7cc806..84e96a4 100644 --- a/src/common/Audio/cw.c +++ b/src/common/Audio/cw.c @@ -425,8 +425,9 @@ static size_t psk_text_to_phase_buffer(const char* instr, uint8_t* outbits) /* Encode the message, with 00 between letters */ for (j=0; j < strlen(instr); j++) { - if (instr[j] < sizeof(psk_varicode)) { - const char* varicode_bits = psk_varicode[(int)instr[j]]; + const uint16_t ix = instr[j]; + if (ix < sizeof(psk_varicode)) { + const char* varicode_bits = psk_varicode[ix]; for(k=0; k < strlen(varicode_bits); k++) { outbits[i++] = (varicode_bits[k] == '1') ? 1 : 0; } -- cgit v1.2.3