From bc29c5105d5936caac6ca56bab7f79e1600ef322 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 3 Mar 2023 16:46:03 +0000 Subject: [PATCH] Fix gcc warnings --- sdrbase/util/baudot.cpp | 2 +- sdrbase/util/navtex.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sdrbase/util/baudot.cpp b/sdrbase/util/baudot.cpp index 29bd0938d..ed7b95eb2 100644 --- a/sdrbase/util/baudot.cpp +++ b/sdrbase/util/baudot.cpp @@ -164,7 +164,7 @@ void BaudotDecoder::init() QString BaudotDecoder::decode(char bits) { - QString c = m_figure ? m_figures[bits] : m_letters[bits]; + QString c = m_figure ? m_figures[(int)bits] : m_letters[(int)bits]; if ((c == '>') || (m_unshiftOnSpace && (c == " "))) { diff --git a/sdrbase/util/navtex.cpp b/sdrbase/util/navtex.cpp index 3d605a9e2..37dd9600a 100644 --- a/sdrbase/util/navtex.cpp +++ b/sdrbase/util/navtex.cpp @@ -270,16 +270,15 @@ const NavtexTransmitter* NavtexTransmitter::getTransmitter(QTime time, int area, } NavtexMessage::NavtexMessage(QDateTime dateTime, const QString& stationId, const QString& typeId, const QString& id, const QString& message) : - m_dateTime(dateTime), m_stationId(stationId), m_typeId(typeId), m_id(id), m_message(message), + m_dateTime(dateTime), m_valid(true) { } - NavtexMessage::NavtexMessage(const QString& text) { m_dateTime = QDateTime::currentDateTime(); @@ -448,7 +447,7 @@ QString SitorBDecoder::printable(char c) } else if (c == 0x7) { return "Bell"; } else { - return c; + return QString("%1").arg(c); } } @@ -721,9 +720,9 @@ const char SitorBDecoder::m_ccir476FigureSetDecode[128] = { char SitorBDecoder::ccir476Decode(char c) { if (m_figureSet) { - return m_ccir476FigureSetDecode[c]; + return m_ccir476FigureSetDecode[(int)c]; } else { - return m_ccir476LetterSetDecode[c]; + return m_ccir476LetterSetDecode[(int)c]; } }