[dss-commits] r8791 - in dss/trunk/core: sim web
dss-commits at forum.digitalstrom.org
dss-commits at forum.digitalstrom.org
Tue Sep 22 19:29:16 CEST 2009
Author: pstaehlin
Date: 2009-09-22 19:29:16 +0200 (Tue, 22 Sep 2009)
New Revision: 8791
Modified:
dss/trunk/core/sim/dsid_plugin.cpp
dss/trunk/core/sim/dssim.cpp
dss/trunk/core/web/webserverplugin.cpp
Log:
dSS code compiles with -fstrict-aliasing (code generated by gSOAP still doesn't)
Modified: dss/trunk/core/sim/dsid_plugin.cpp
===================================================================
--- dss/trunk/core/sim/dsid_plugin.cpp 2009-09-22 15:14:59 UTC (rev 8790)
+++ dss/trunk/core/sim/dsid_plugin.cpp 2009-09-22 17:29:16 UTC (rev 8791)
@@ -41,7 +41,7 @@
m_Handle(_handle)
{
struct dsid_interface* (*get_interface)();
- *(void**)(&get_interface) = dlsym(m_SOHandle, "dsid_get_interface");
+ get_interface = (struct dsid_interface*(*)())dlsym(m_SOHandle, "dsid_get_interface");
char* error;
if((error = dlerror()) != NULL) {
Logger::getInstance()->log("sim: error getting interface");
@@ -169,7 +169,7 @@
: DSIDCreator(_pluginName),
m_SOHandle(_soHandle)
{
- *(void**)(&createInstance) = dlsym(m_SOHandle, "dsid_create_instance");
+ createInstance = (int (*)())dlsym(m_SOHandle, "dsid_create_instance");
char* error;
if((error = dlerror()) != NULL) {
Logger::getInstance()->log("sim: error getting pointer to dsid_create_instance");
Modified: dss/trunk/core/sim/dssim.cpp
===================================================================
--- dss/trunk/core/sim/dssim.cpp 2009-09-22 15:14:59 UTC (rev 8790)
+++ dss/trunk/core/sim/dssim.cpp 2009-09-22 17:29:16 UTC (rev 8791)
@@ -169,7 +169,7 @@
dlerror();
int (*version)();
- *(void**) (&version) = dlsym(handle, "dsid_getversion");
+ version = (int (*)())dlsym(handle, "dsid_getversion");
char* error;
if((error = dlerror()) != NULL) {
log("LoadPlugins: Could not get symbol 'dsid_getversion' from plugin: \"" + dir_itr->leaf() + "\":" + error, lsError);
@@ -183,7 +183,7 @@
}
const char* (*get_name)();
- *(void**)(&get_name) = dlsym(handle, "dsid_get_plugin_name");
+ get_name = (const char*(*)())dlsym(handle, "dsid_get_plugin_name");
if((error = dlerror()) != NULL) {
log("LoadPlugins: could get name from \"" + dir_itr->leaf() + "\":" + error, lsError);
continue;
Modified: dss/trunk/core/web/webserverplugin.cpp
===================================================================
--- dss/trunk/core/web/webserverplugin.cpp 2009-09-22 15:14:59 UTC (rev 8790)
+++ dss/trunk/core/web/webserverplugin.cpp 2009-09-22 17:29:16 UTC (rev 8791)
@@ -57,7 +57,7 @@
dlerror();
int (*version)();
- *(void**) (&version) = dlsym(m_Handle, "plugin_getversion");
+ version = (int (*)())dlsym(m_Handle, "plugin_getversion");
char* error;
if((error = dlerror()) != NULL) {
Logger::getInstance()->log("WebServerPlugin::load(): Could not get symbol 'plugin_getversion' from \"" + m_File + "\":" + error, lsError);
@@ -70,7 +70,8 @@
return;
}
- *(void**) (&m_pHandleRequest) = dlsym(m_Handle, "plugin_handlerequest");
+ m_pHandleRequest = (bool (*)(const std::string& _uri, dss::HashMapConstStringString& _parameter, dss::DSS& _dss, std::string& result))
+ dlsym(m_Handle, "plugin_handlerequest");
if((error = dlerror()) != NULL) {
Logger::getInstance()->log("WebServerPlugin::load(): Could not get symbol 'plugin_handlerequest' from plugin: \"" + m_File + "\":" + error, lsError);
return;
More information about the dss-commits
mailing list