summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2009-09-22 22:51:43 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2009-10-04 10:48:40 +0200
commitd893b09863d808bf4127a011f3e76f8ae7433082 (patch)
tree11cef84ed3ddeff9aee0538739225b0e071b985f
parent99399a212b4530d5a625d9ee81f334bfd173ffd0 (diff)
avoid some more warnings in orkbasecxx
mainly constifications
-rw-r--r--orkbasecxx/ConfigManager.cpp12
-rw-r--r--orkbasecxx/LogManager.cpp10
2 files changed, 11 insertions, 11 deletions
diff --git a/orkbasecxx/ConfigManager.cpp b/orkbasecxx/ConfigManager.cpp
index 85ad41e..1ae39fc 100644
--- a/orkbasecxx/ConfigManager.cpp
+++ b/orkbasecxx/ConfigManager.cpp
@@ -10,7 +10,7 @@
* Please refer to http://www.gnu.org/copyleft/gpl.html
*
*/
-#pragma warning( disable: 4786 ) // disables truncated symbols in browse-info warning
+//#pragma warning( disable: 4786 ) // disables truncated symbols in browse-info warning
#define _WINSOCKAPI_ // prevents the inclusion of winsock.h
@@ -48,8 +48,8 @@ void ConfigManager::Initialize()
try
{
- char* cfgFilename = "";
- char* cfgEnvPath = "";
+ char* cfgFilename = NULL;
+ const char* cfgEnvPath = "";
int cfgAlloc = 0;
cfgEnvPath = ACE_OS::getenv("ORKAUDIO_CONFIG_PATH");
@@ -69,19 +69,19 @@ void ConfigManager::Initialize()
}
}
- if(!cfgFilename || !strlen(cfgFilename)) {
+ if(!cfgFilename) {
FILE* file = ACE_OS::fopen(CONFIG_FILE_NAME, "r");
if(file)
{
// config.xml exists in the current directory
- cfgFilename = CONFIG_FILE_NAME;
+ cfgFilename = (char*)CONFIG_FILE_NAME;
fclose(file);
}
else
{
// config.xml could not be found in the current
// directory, try to find it in system configuration directory
- cfgFilename = ETC_CONFIG_FILE_NAME;
+ cfgFilename = (char*)ETC_CONFIG_FILE_NAME;
}
}
diff --git a/orkbasecxx/LogManager.cpp b/orkbasecxx/LogManager.cpp
index 6259a70..552d1eb 100644
--- a/orkbasecxx/LogManager.cpp
+++ b/orkbasecxx/LogManager.cpp
@@ -30,8 +30,8 @@ void OrkLogManager::Initialize()
{
BasicConfigurator::configure();
- char* logCfgFilename = "";
- char* cfgEnvPath = "";
+ char* logCfgFilename = NULL;
+ const char* cfgEnvPath = "";
int cfgAlloc = 0;
cfgEnvPath = ACE_OS::getenv("ORKAUDIO_CONFIG_PATH");
@@ -51,19 +51,19 @@ void OrkLogManager::Initialize()
}
}
- if(!logCfgFilename || !strlen(logCfgFilename)) {
+ if(!logCfgFilename) {
FILE* file = ACE_OS::fopen("logging.properties", "r");
if(file)
{
// logging.properties exists in the current directory
- logCfgFilename = "logging.properties";
+ logCfgFilename = (char*)"logging.properties";
fclose(file);
}
else
{
// logging.properties could not be found in the current
// directory, try to find it in system configuration directory
- logCfgFilename = "/etc/orkaudio/logging.properties";
+ logCfgFilename = (char*)"/etc/orkaudio/logging.properties";
}
}