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:
parent
51f186597c
commit
52b68c9ea2
5 changed files with 9 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -950,7 +950,7 @@ void SetupPanel::startupSwitchEdited(int value)
|
|||
}
|
||||
else {
|
||||
shift = index+1;
|
||||
mask = 0x01ul << shift;
|
||||
mask = 0x01ull << shift;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,13 +93,12 @@ void FlashProcess::onStarted()
|
|||
progress->addSeparator();
|
||||
}
|
||||
|
||||
# if !__GNUC__
|
||||
#if !__GNUC__
|
||||
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
|
||||
|
||||
|
@ -129,7 +128,7 @@ bool killProcessByName(const char *szProcessToKill)
|
|||
|
||||
void FlashProcess::onKillTimerElapsed()
|
||||
{
|
||||
# if !__GNUC__
|
||||
#if !__GNUC__
|
||||
// trick to accelerate SAM-BA startup
|
||||
killProcessByName("tasklist.exe");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue