From 1927af2fcfe5b6061a9f2a943d281e6d662ed9c7 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 14 Oct 2016 09:29:06 +0100 Subject: [PATCH] Remove unneeded time handling and fix compiler warnings. --- YSFGateway/APRSWriter.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/YSFGateway/APRSWriter.cpp b/YSFGateway/APRSWriter.cpp index cb4fa1c..43a2f61 100644 --- a/YSFGateway/APRSWriter.cpp +++ b/YSFGateway/APRSWriter.cpp @@ -24,7 +24,6 @@ #include #include #include -#include CAPRSWriter::CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& password, const std::string& address, unsigned int port) : m_thread(NULL), @@ -143,10 +142,6 @@ void CAPRSWriter::sendIdFrames() if (!m_thread->isConnected()) return; - time_t now; - ::time(&now); - struct tm* tm = ::gmtime(&now); - // Default values aren't passed on if (m_latitude == 0.0F && m_longitude == 0.0F) return; @@ -162,7 +157,7 @@ void CAPRSWriter::sendIdFrames() ::strcpy(desc, "MMDVM Voice"); } - const char* band; + const char* band = "4m"; if (m_txFrequency >= 1200000000U) band = "1.2"; else if (m_txFrequency >= 420000000U) @@ -190,7 +185,7 @@ void CAPRSWriter::sendIdFrames() ::sprintf(lon, "%05.2lf", longitude); std::string server = m_callsign; - int pos = server.find_first_of('-'); + size_t pos = server.find_first_of('-'); if (pos == std::string::npos) server.append("-S"); else