Addressing some compilation warnings:
authorJamie Thompson <jamie@.(none)>
Sun, 16 Oct 2011 00:00:50 +0000 (01:00 +0100)
committerJamie Thompson <jamie@.(none)>
Sun, 16 Oct 2011 00:00:50 +0000 (01:00 +0100)
Explicitly disabled unused parameters for time being until functionality requiring them is completed.
Added explicit casts to cater from Qt's count() methods returning ints rather than the more correct uints.

DBBackends/Fmms.cpp
DBBackends/RtcomEventLogger.cpp
EventParsers/CSVSymbianEventLogParser.cpp
EventParsers/MMSParser.cpp
EventParsers/VMGEntities/VBody.cpp
EventParsers/VMGEntities/VCalendar.cpp
EventParsers/VMGParser.cpp
EventTypes/SMS.cpp
main.cpp

index e2817fa..869dfe5 100644 (file)
@@ -25,17 +25,17 @@ Fmms::Fmms(const Settings &settings) :
 {
 }
 
-Fmms::Fmms(const Settings &settings, const EventTypes::FmmsEvent &event) :
+Fmms::Fmms(const Settings &settings, const EventTypes::FmmsEvent &/*event*/) :
        m_Settings(settings)
 {
 }
 
-void Fmms::Process(EventProcessors::iEventProcessor &eventProcessor)
+void Fmms::Process(EventProcessors::iEventProcessor &/*eventProcessor*/)
 {
 
 }
 
-EventTypes::iEvent *const Fmms::CreateEvent(int &fevent, QList<void *> &fattachments)
+EventTypes::iEvent *const Fmms::CreateEvent(int &/*fevent*/, QList<void *> &/*fattachments*/)
 {
        return 0;
 }
@@ -44,7 +44,7 @@ void Fmms::PreInsert()
 {
 }
 
-void Fmms::Insert(EventTypes::iEvent &event, const NumberToNameLookup &numberToNameLookup)
+void Fmms::Insert(EventTypes::iEvent &/*event*/, const NumberToNameLookup &/*numberToNameLookup*/)
 {
        return;
 }
index 0766fa2..e94f913 100644 (file)
@@ -76,7 +76,7 @@ RtcomEventLogger::RtcomEventLogger(const Settings &settings) :
                qDebug() << "Failed to create event logger.";
 }
 
-RtcomEventLogger::RtcomEventLogger(const Settings &settings, const EventTypes::RtcomEvent &event) :
+RtcomEventLogger::RtcomEventLogger(const Settings &settings, const EventTypes::RtcomEvent &/*event*/) :
        m_Settings(settings)
 {
 }
index 91855e1..45613e2 100644 (file)
@@ -64,7 +64,7 @@ iEventParser *CSVSymbianEventLogParser::IsValid(const Settings &currentSettings,
                return NULL;
 }
 
-CSVSymbianEventLogParser::CSVSymbianEventLogParser(const Settings &settings, const QString &filename/*, const QChar delimiter, const int numColumnsPerRecord, const ColumnIndicesHash &headingIndices*/)
+CSVSymbianEventLogParser::CSVSymbianEventLogParser(const Settings &settings, const QString &/*filename, const QChar delimiter, const int numColumnsPerRecord, const ColumnIndicesHash &headingIndices*/)
        : m_Settings(settings)/*, m_Delimiter(delimiter), m_NumColumnsPerRecord(numColumnsPerRecord), m_HeadingIndices(headingIndices)*/
 {
 }
index 1549e60..4a8f5f4 100644 (file)
@@ -43,7 +43,7 @@ iEventParser *MMSParser::IsValid(QFile &eventFile)
                char fieldMessageType = 0x8C;
                char fieldTransactionID = 0x98; // Optional
                char fieldMessageMMSVersion = 0x8D;
-               char fieldMessageDate = 0x85;
+               //char fieldMessageDate = 0x85; // Not currently needed for checks.
                uint offset = 0;
                if(fileIDBuf[offset++] == fieldMessageType)
                {
@@ -89,11 +89,11 @@ iEventParser *MMSParser::IsValid(QFile &eventFile)
        return false;
 }
 
-MMSParser::MMSParser(const QString &filename)
+MMSParser::MMSParser(const QString &/*filename*/)
 {
 }
 
-EventTypes::EventFromFileList MMSParser::ParseFile(QFile &eventFile, const QList<uint> &recordsToReturn)
+EventTypes::EventFromFileList MMSParser::ParseFile(QFile &/*eventFile*/, const QList<uint> &/*recordsToReturn*/)
 {
        qDebug() << "MMS Parsing NYI!";
        return EventTypes::EventFromFileList();
index 923fe07..990e713 100644 (file)
@@ -35,15 +35,12 @@ VBody::VBody(const Settings &settings, const SMSEntity *parent) :
 {
 }
 
-//VBody::VBody(QTextStream& stream)
-//{
-//}
-
 VBody::~VBody()
 {
 }
 
-void VBody::Write(QTextStream &stream, const EventTypes::SMS &event, const NumberToNameLookup &numberToNameLookup)
+// Note: NametoNumberLookup is currently unused here.
+void VBody::Write(QTextStream &stream, const EventTypes::SMS &event, const NumberToNameLookup &)
 {
        stream << "BEGIN:" << getTagName() << endl;
 
index 91062cf..0695efa 100644 (file)
@@ -56,7 +56,8 @@ VCalendar::~VCalendar()
 {
 }
 
-void VCalendar::Write(QTextStream &stream, const EventTypes::SMS &event, const NumberToNameLookup &numberToNameLookup)
+// TODO: Support writing out Calendar entires sent via SMS
+void VCalendar::Write(QTextStream &/*stream*/, const EventTypes::SMS &/*event*/, const NumberToNameLookup &/*numberToNameLookup*/)
 {
        //stream << "BEGIN:" << getTagName() << "\n";
 
@@ -71,8 +72,8 @@ bool VCalendar::Read(const QString &initialLine, QTextStream &stream, EventTypes
 {
        bool hasEnded(false);
        float version(0);
-       bool isTopLevel(typeid(*getParent()) == typeid(VMessage));
-       bool isSender(typeid(*getParent()) == typeid(VEnvelope));
+       //bool isTopLevel(typeid(*getParent()) == typeid(VMessage)); Not used.
+       //bool isSender(typeid(*getParent()) == typeid(VEnvelope)); Not used.
        Attachment *vCalendarAttachment;
 
        if(isAttachment())
index f8306a0..32bc596 100644 (file)
@@ -68,7 +68,7 @@ iEventParser *VMGParser::IsValid(const Settings &settings, QFile &eventFile)
        return false;
 }
 
-VMGParser::VMGParser(const Settings &settings, const QString &filename) : m_Settings(settings)
+VMGParser::VMGParser(const Settings &settings, const QString &/*filename*/) : m_Settings(settings)
 {
 }
 
index c067fe6..bcf0b87 100644 (file)
@@ -124,7 +124,7 @@ RTComElEvent * SMS::toRTComEvent(const NumberToNameLookup &numberToNameLookup) c
 void SMS::WriteCSVSymbian(QTextStream &stream, const ColumnIndicesByIndexHash &headerIndices, const QChar delimiter, const NumberToNameLookup &numberToNameLookup, SymbianEventLogStrings &strings) const
 {
        // 0|05/09/2007 11:25:12 am|1||||||<name>|3|8|0|0|<number>|||Unrecognized||
-       for(uint columnIndex(0); columnIndex < headerIndices.count(); ++columnIndex)
+       for(uint columnIndex(0); columnIndex < (uint)headerIndices.count(); ++columnIndex)
        {
                const QString &heading(headerIndices.value(columnIndex));
                if("etype" == heading.toLower())
@@ -141,13 +141,13 @@ void SMS::WriteCSVSymbian(QTextStream &stream, const ColumnIndicesByIndexHash &h
                }
                else if("direction" == heading.toLower())
                {
-                       if(Settings::OUTGOING == Destination())
+                       if(SMS::SENT == Destination())
                        {
                                if(!strings.contains("Outgoing"))
                                        strings.insert("Outgoing", strings.count());
                                stream << strings.value("Outgoing");
                        }
-                       else if (Settings::INCOMING == Destination())
+                       else if (SMS::INBOX == Destination())
                        {
                                if(!strings.contains("Incoming"))
                                        strings.insert("Incoming", strings.count());
@@ -190,7 +190,7 @@ void SMS::WriteCSVSymbian(QTextStream &stream, const ColumnIndicesByIndexHash &h
                        // generated.
                }
 
-               if(columnIndex < headerIndices.count() - 1)
+               if(columnIndex < (uint)headerIndices.count() - 1)
                        stream << delimiter;
        }
 
index a19b8dc..1ea766f 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -28,7 +28,7 @@
 #include <QHash>
 
 #include <glib-2.0/glib.h>
-void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
+void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer)
 {
        qDebug() << "GLIB: <D>" << log_domain << "<L>" << log_level << "<M>" << message << "\n";
 }