summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>2012-10-05 04:03:33 -0700
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>2012-10-22 03:55:52 -0700
commitbc5aaf1bc41ce117b50c2cec913adcbc4e8caa2f (patch)
treeb52e55225308ab60ccb6946145b4f01a5e8e8e3a
parentfd4c79688809755965a5d52226947bd2e5155ec6 (diff)
downloadlayer_management-bc5aaf1bc41ce117b50c2cec913adcbc4e8caa2f.tar.gz
GenericCommunicator: fixed issues caused by new compiler warning settings
-rw-r--r--LayerManagerPlugins/Communicators/GenericCommunicator/src/GenericCommunicator.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/LayerManagerPlugins/Communicators/GenericCommunicator/src/GenericCommunicator.cpp b/LayerManagerPlugins/Communicators/GenericCommunicator/src/GenericCommunicator.cpp
index a9c6938..99c268b 100644
--- a/LayerManagerPlugins/Communicators/GenericCommunicator/src/GenericCommunicator.cpp
+++ b/LayerManagerPlugins/Communicators/GenericCommunicator/src/GenericCommunicator.cpp
@@ -2502,19 +2502,22 @@ void GenericCommunicator::sendNotification(GraphicalObject* object, t_ilm_notifi
m_ipcModule.appendUint(notification, chromaKeyBlue);
int clientCount = arl.size();
- t_ilm_client_handle clients[clientCount];
+ t_ilm_client_handle clientArray[256];
ApplicationReferenceList::iterator iter = arl.begin();
ApplicationReferenceList::iterator end = arl.end();
- for (int clientNumber = 0; iter != end; ++iter, ++clientNumber)
+ for (int clientNumber = 0;
+ iter != end, clientNumber < 256;
+ ++iter, ++clientNumber)
{
- clients[clientNumber] = *iter;
+ t_ilm_client_handle client = *iter;
+ clientArray[clientNumber] = client;
}
LOG_DEBUG("GenericCommunicator", "Sending " << clientCount << " notification(s): layer " << layer->getID() << " was updated.");
- if (!m_ipcModule.sendToClients(notification, clients, clientCount))
+ if (!m_ipcModule.sendToClients(notification, clientArray, clientCount))
{
LOG_ERROR("GenericCommunicator", "Sending notification to clients failed.")
}
@@ -2571,12 +2574,14 @@ void GenericCommunicator::sendNotification(GraphicalObject* object, t_ilm_notifi
m_ipcModule.appendUint(notification, chromaKeyBlue);
int clientCount = arl.size();
- t_ilm_client_handle clients[clientCount];
+ t_ilm_client_handle clients[256];
ApplicationReferenceList::iterator iter = arl.begin();
ApplicationReferenceList::iterator end = arl.end();
- for (int clientNumber = 0; iter != end; ++iter, ++clientNumber)
+ for (int clientNumber = 0;
+ iter != end, clientNumber < 256;
+ ++iter, ++clientNumber)
{
clients[clientNumber] = *iter;
}