fix (justified) warnings about potential use of uninitialized variable in wxTCPEventHandler::Client_OnRequest()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -680,17 +680,21 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event)
|
|||||||
const wxString topic = connection->m_topic;
|
const wxString topic = connection->m_topic;
|
||||||
wxString item;
|
wxString item;
|
||||||
|
|
||||||
|
bool error = false;
|
||||||
|
|
||||||
const int msg = streams->Read8();
|
const int msg = streams->Read8();
|
||||||
switch ( msg )
|
switch ( msg )
|
||||||
{
|
{
|
||||||
case IPC_EXECUTE:
|
case IPC_EXECUTE:
|
||||||
{
|
{
|
||||||
wxIPCFormat format;
|
wxIPCFormat format;
|
||||||
size_t size;
|
size_t size wxDUMMY_INITIALIZE(0);
|
||||||
void * const
|
void * const
|
||||||
data = streams->ReadFormatData(connection, &format, &size);
|
data = streams->ReadFormatData(connection, &format, &size);
|
||||||
|
if ( data )
|
||||||
connection->OnExecute(topic, data, size, format);
|
connection->OnExecute(topic, data, size, format);
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -699,11 +703,14 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event)
|
|||||||
item = streams->ReadString();
|
item = streams->ReadString();
|
||||||
|
|
||||||
wxIPCFormat format;
|
wxIPCFormat format;
|
||||||
size_t size;
|
size_t size wxDUMMY_INITIALIZE(0);
|
||||||
void * const
|
void * const
|
||||||
data = streams->ReadFormatData(connection, &format, &size);
|
data = streams->ReadFormatData(connection, &format, &size);
|
||||||
|
|
||||||
connection->OnAdvise(topic, item, data, size, format);
|
if ( data )
|
||||||
|
connection->OnAdvise(topic, item, data, size, format);
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -732,10 +739,13 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event)
|
|||||||
item = streams->ReadString();
|
item = streams->ReadString();
|
||||||
wxIPCFormat format = (wxIPCFormat)streams->Read8();
|
wxIPCFormat format = (wxIPCFormat)streams->Read8();
|
||||||
|
|
||||||
size_t size;
|
size_t size wxDUMMY_INITIALIZE(0);
|
||||||
void * const data = streams->ReadData(connection, &size);
|
void * const data = streams->ReadData(connection, &size);
|
||||||
|
|
||||||
connection->OnPoke(topic, item, data, size, format);
|
if ( data )
|
||||||
|
connection->OnPoke(topic, item, data, size, format);
|
||||||
|
else
|
||||||
|
error = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -789,9 +799,12 @@ void wxTCPEventHandler::Client_OnRequest(wxSocketEvent &event)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
wxLogDebug("Unknown message code %d received.", msg);
|
wxLogDebug("Unknown message code %d received.", msg);
|
||||||
IPCOutput(streams).Write8(IPC_FAIL);
|
error = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( error )
|
||||||
|
IPCOutput(streams).Write8(IPC_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTCPEventHandler::Server_OnRequest(wxSocketEvent &event)
|
void wxTCPEventHandler::Server_OnRequest(wxSocketEvent &event)
|
||||||
|
Reference in New Issue
Block a user