1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 00:35:14 +03:00

[companion] Fix a few reasonable warnings brought up by MSVC /W3. (#4206)

This commit is contained in:
Max Paperno 2017-01-07 02:33:57 -05:00 committed by Bertrand Songis
parent 51f186597c
commit 52b68c9ea2
5 changed files with 9 additions and 11 deletions

View file

@ -864,7 +864,7 @@ void startSimulation(QWidget * parent, RadioData & radioData, int modelIdx)
}
dialog->exec();
delete dialog;
dialog->deleteLater();
delete simuData;
#if defined(WIN32) && defined(WIN_USE_CONSOLE_STDIO)
FreeConsole();
@ -941,10 +941,9 @@ QString index2version(int index)
}
}
int qunlink(const QString & fileName)
bool qunlink(const QString & fileName)
{
QByteArray ba = fileName.toLatin1();
return unlink(ba.constData());
return QFile::remove(fileName);
}
QString generateProcessUniqueTempFileName(const QString & fileName)

View file

@ -187,7 +187,7 @@ class QTimeS : public QTime
int seconds() const { return hour()*3600 + minute()*60 + second(); };
};
int qunlink(const QString & fileName);
bool qunlink(const QString & fileName);
QString generateProcessUniqueTempFileName(const QString & fileName);
bool isTempFileName(const QString & fileName);

View file

@ -78,7 +78,7 @@ void MixesPanel::update()
QString str = "";
while (curDest < mix.destCh-1) {
curDest++;
AddMixerLine(-curDest);
AddMixerLine(-int(curDest));
}
if (AddMixerLine(i)) {
curDest++;
@ -87,7 +87,7 @@ void MixesPanel::update()
while (curDest < outputs) {
curDest++;
AddMixerLine(-curDest);
AddMixerLine(-int(curDest));
}
}

View file

@ -950,7 +950,7 @@ void SetupPanel::startupSwitchEdited(int value)
}
else {
shift = index+1;
mask = 0x01ul << shift;
mask = 0x01ull << shift;
}
}

View file

@ -99,7 +99,6 @@ bool killProcessByName(const char *szProcessToKill)
HANDLE hProcessSnap;
HANDLE hProcess;
PROCESSENTRY32 pe32;
DWORD dwPriorityClass;
hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); // Takes a snapshot of all the processes