mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 22:29:13 +08:00
Fix warning detected by gcc 4.9.1
- unused variables - linker error with the MinGW DX SDK - don't delete a void* pointer - initialization order
This commit is contained in:
@@ -204,8 +204,12 @@ namespace BlackSimPlugin
|
|||||||
SafeDeleteArray(pSettings->pwszPlayerName);
|
SafeDeleteArray(pSettings->pwszPlayerName);
|
||||||
SafeDeleteArray(pSettings->dpnAppDesc.pwszSessionName);
|
SafeDeleteArray(pSettings->dpnAppDesc.pwszSessionName);
|
||||||
SafeDeleteArray(pSettings->dpnAppDesc.pwszPassword);
|
SafeDeleteArray(pSettings->dpnAppDesc.pwszPassword);
|
||||||
SafeDeleteArray(pSettings->dpnAppDesc.pvReservedData);
|
|
||||||
SafeDeleteArray(pSettings->dpnAppDesc.pvApplicationReservedData);
|
// The following two lines came from DX9 SDK samples, but they don't make sense.
|
||||||
|
// Deleteing a void* pointer is considered unsafe. If you really had to pass
|
||||||
|
// anything non-void here, make sure the original object is cleaned up properly.
|
||||||
|
// SafeDeleteArray(pSettings->dpnAppDesc.pvReservedData);
|
||||||
|
// SafeDeleteArray(pSettings->dpnAppDesc.pvApplicationReservedData);
|
||||||
SafeRelease(pSettings->pdp8HostAddress);
|
SafeRelease(pSettings->pdp8HostAddress);
|
||||||
SafeRelease(pSettings->ppdp8DeviceAddresses[0]);
|
SafeRelease(pSettings->ppdp8DeviceAddresses[0]);
|
||||||
SafeDeleteArray(pSettings->ppdp8DeviceAddresses);
|
SafeDeleteArray(pSettings->ppdp8DeviceAddresses);
|
||||||
@@ -225,6 +229,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
PDPL_MESSAGE_DISCONNECT pDisconnectMsg;
|
PDPL_MESSAGE_DISCONNECT pDisconnectMsg;
|
||||||
pDisconnectMsg = (PDPL_MESSAGE_DISCONNECT)msgBuffer;
|
pDisconnectMsg = (PDPL_MESSAGE_DISCONNECT)msgBuffer;
|
||||||
|
Q_UNUSED(pDisconnectMsg)
|
||||||
|
|
||||||
// We should free any data associated with the
|
// We should free any data associated with the
|
||||||
// app here, but there is none.
|
// app here, but there is none.
|
||||||
@@ -235,6 +240,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
PDPL_MESSAGE_RECEIVE pReceiveMsg;
|
PDPL_MESSAGE_RECEIVE pReceiveMsg;
|
||||||
pReceiveMsg = (PDPL_MESSAGE_RECEIVE)msgBuffer;
|
pReceiveMsg = (PDPL_MESSAGE_RECEIVE)msgBuffer;
|
||||||
|
Q_UNUSED(pReceiveMsg)
|
||||||
|
|
||||||
// The lobby app sent us data. This sample doesn't
|
// The lobby app sent us data. This sample doesn't
|
||||||
// expected data from the app, but it is useful
|
// expected data from the app, but it is useful
|
||||||
@@ -275,6 +281,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
PDPL_MESSAGE_CONNECTION_SETTINGS pConnectionStatusMsg;
|
PDPL_MESSAGE_CONNECTION_SETTINGS pConnectionStatusMsg;
|
||||||
pConnectionStatusMsg = (PDPL_MESSAGE_CONNECTION_SETTINGS)msgBuffer;
|
pConnectionStatusMsg = (PDPL_MESSAGE_CONNECTION_SETTINGS)msgBuffer;
|
||||||
|
Q_UNUSED(pConnectionStatusMsg)
|
||||||
|
|
||||||
// The app has changed the connection settings.
|
// The app has changed the connection settings.
|
||||||
// This simple client doesn't handle this, but more complex clients may
|
// This simple client doesn't handle this, but more complex clients may
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ TEMPLATE = lib
|
|||||||
CONFIG += plugin shared
|
CONFIG += plugin shared
|
||||||
CONFIG += blackmisc blackcore blacksim
|
CONFIG += blackmisc blackcore blacksim
|
||||||
|
|
||||||
LIBS += -lsimulator_fscommon -lFSUIPC_User
|
LIBS += -lsimulator_fscommon -lFSUIPC_User -luuid
|
||||||
|
|
||||||
# required for FSUIPC
|
# required for FSUIPC
|
||||||
win32:!win32-g++*: QMAKE_LFLAGS += /NODEFAULTLIB:LIBC.lib
|
win32:!win32-g++*: QMAKE_LFLAGS += /NODEFAULTLIB:LIBC.lib
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ namespace BlackSimPlugin
|
|||||||
ISimulator(parent),
|
ISimulator(parent),
|
||||||
m_fs9Host(new CFs9Host),
|
m_fs9Host(new CFs9Host),
|
||||||
m_hostThread(this),
|
m_hostThread(this),
|
||||||
m_simulatorInfo(CSimulatorInfo::FS9()),
|
|
||||||
m_lobbyClient(new CLobbyClient(this)),
|
m_lobbyClient(new CLobbyClient(this)),
|
||||||
|
m_simulatorInfo(CSimulatorInfo::FS9()),
|
||||||
m_fsuipc(new FsCommon::CFsuipc())
|
m_fsuipc(new FsCommon::CFsuipc())
|
||||||
{
|
{
|
||||||
// We move the host thread already in the constructor
|
// We move the host thread already in the constructor
|
||||||
@@ -332,7 +332,10 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
m_fs9ClientThreads.remove(client);
|
m_fs9ClientThreads.remove(client);
|
||||||
m_hashFs9Clients.remove(callsign);
|
m_hashFs9Clients.remove(callsign);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user