[asterisk-scf-commits] asterisk-scf/release/servicediscovery.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Dec 14 09:55:09 CST 2010


branch "master" has been updated
       via  4b52680a3a4359525e91b70779993cdf66da9726 (commit)
      from  066fff4c1b4413da7a4a4d4b46beae802bf5bc89 (commit)

Summary of changes:
 src/ServiceLocatorManagement.cpp |    9 +++++++--
 test/TestServiceLocator.cpp      |    2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 4b52680a3a4359525e91b70779993cdf66da9726
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Dec 14 12:24:24 2010 -0330

    Dealing with a couple of compiler issues:
    - anonymous namespace warning on CentOS
    - unable to cast 0 to const char* on another platform

diff --git a/src/ServiceLocatorManagement.cpp b/src/ServiceLocatorManagement.cpp
index 914ce7b..29ca8b8 100644
--- a/src/ServiceLocatorManagement.cpp
+++ b/src/ServiceLocatorManagement.cpp
@@ -32,7 +32,11 @@ using namespace AsteriskSCF::System::Logging;
 using namespace AsteriskSCF::Core::Discovery::V1;
 using namespace AsteriskSCF::ServiceDiscovery;
 
-namespace
+//
+// Normally would use an anonymous namespace here, but there is a compiler
+// bug on some distributions (CentOS!) that causes it to complain.
+//
+namespace ServiceLocatorManagementImplNS
 {
 
 const Logger& lg = getLoggerFactory().getLogger("AsteriskSCF.System.Discovery");
@@ -281,8 +285,9 @@ private:
 };
 typedef IceUtil::Handle<LocateCallback> LocateCallbackPtr;
 
-} // end of anonymous namespace
+} // end of ServiceLocatorManagementImplNS namespace 
 
+using namespace ServiceLocatorManagementImplNS;
 IsSupportedCallback::~IsSupportedCallback()
 {
     // no-op
diff --git a/test/TestServiceLocator.cpp b/test/TestServiceLocator.cpp
index 92a49f8..f93556d 100644
--- a/test/TestServiceLocator.cpp
+++ b/test/TestServiceLocator.cpp
@@ -745,7 +745,7 @@ void ServiceLocatorTest::start(std::string const &name,
         argv.push_back(i->c_str());
     }
     // null terminated list
-    argv.push_back(0);
+    argv.push_back((const char*)0);
 
     mCachedArgs.argc = argv.size() - 1;
     mCachedArgs.argv = (char**)&argv[0];

-----------------------------------------------------------------------


-- 
asterisk-scf/release/servicediscovery.git



More information about the asterisk-scf-commits mailing list