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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Apr 15 09:15:13 CDT 2011


branch "master" has been updated
       via  42c99da77483e81f27dd51caf997df6f3999b6f3 (commit)
      from  17315ed02076c88dde9e74b93c661c255b28fffa (commit)

Summary of changes:
 src/BasicRoutingServiceApp.cpp |    4 ++--
 src/SessionRouter.cpp          |   22 +++++++++++-----------
 test/MockBridge.cpp            |    6 +++---
 test/MockSessionEndpoint.cpp   |    2 +-
 test/TestRouting.cpp           |    4 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)


- Log -----------------------------------------------------------------
commit 42c99da77483e81f27dd51caf997df6f3999b6f3
Author: Kevin P. Fleming <kpfleming at digium.com>
Date:   Thu Apr 14 13:25:27 2011 -0500

    Minor fixes for various code constructs that trip up GCC with new warning
    options enabled (-Wextra, -Wconversion, -Wformat, and others).

diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 75c5a8f..111f0a1 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -301,7 +301,7 @@ void BasicRoutingServiceApp::initialize()
 /**
  * Implementation of the required IceBox::Service start method.
  */
-void BasicRoutingServiceApp::start(const string& name, const Ice::CommunicatorPtr& communicator, const Ice::StringSeq& args)
+void BasicRoutingServiceApp::start(const string& name, const Ice::CommunicatorPtr& communicator, const Ice::StringSeq&)
 {
     lg(Info) << "Starting...";
 
@@ -375,7 +375,7 @@ void BasicRoutingServiceApp::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new AsteriskSCF::BasicRoutingService::BasicRoutingServiceApp;
 }
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 30abafe..12addb9 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -52,15 +52,15 @@ class RetryPolicy
 public:
     /**
      * Constructor:
-     *  @param maxRetries Maximum number of times to retry. 
+     *  @param retries Maximum number of times to retry. 
      *  @intervalInMilliseconds Will sleep this amount in the retry() method. 
      */
-    RetryPolicy(size_t maxRetries, size_t intervalInMilliseconds) :
-        mMaxRetries(maxRetries),
+    RetryPolicy(size_t retries, size_t intervalInMilliseconds) :
+        mMaxRetries(retries),
         mRetryIntervalMilliseconds(intervalInMilliseconds),
         mCounter(0)
     {
-        assert(maxRetries < 0xffff);
+        assert(mMaxRetries < 0xffff);
     }
 
     /**
@@ -122,23 +122,23 @@ public:
 
 public: // The following operations are implementations of the SessionListener interface.
 
-    void connected(const SessionPrx& session, const Ice::Current&)
+    void connected(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void flashed(const SessionPrx& session, const Ice::Current&)
+    void flashed(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void held(const SessionPrx& session, const Ice::Current&)
+    void held(const SessionPrx&, const Ice::Current&)
     {
     }
 
-    void progressing(const SessionPrx& session, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
+    void progressing(const SessionPrx&, const AsteriskSCF::SessionCommunications::V1::ResponseCodePtr&, const Ice::Current&)
     {
     }
 
-    void ringing(const SessionPrx& session, const Ice::Current&)
+    void ringing(const SessionPrx&, const Ice::Current&)
     {
     }
 
@@ -170,7 +170,7 @@ public: // The following operations are implementations of the SessionListener i
 
     }
 
-    void unheld(const SessionPrx& session, const Ice::Current&)
+    void unheld(const SessionPrx&, const Ice::Current&)
     {
     }
 
@@ -211,7 +211,7 @@ public:
         }
     }
 
-    const int getNumSessions()
+    SessionSeq::size_type getNumSessions()
     {
         boost::shared_lock<boost::shared_mutex> lock(mLock);
         return mSessions.size();
diff --git a/test/MockBridge.cpp b/test/MockBridge.cpp
index b383f61..b85244d 100644
--- a/test/MockBridge.cpp
+++ b/test/MockBridge.cpp
@@ -28,7 +28,7 @@ namespace RoutingTest
 class BridgeSessionListener : public SessionListener
 {
 public:
-    BridgeSessionListener(MockBridge *bridge)
+    BridgeSessionListener(MockBridge *)
     {
     }
 
@@ -68,7 +68,7 @@ private:
 typedef IceUtil::Handle<BridgeSessionListener> BridgeSessionListenerPtr;
 
 
-MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx& listener)
+MockBridge::MockBridge(const SessionSeq& sessions, const BridgeListenerPrx&)
 {
     mListener = new BridgeSessionListener(this);
     Ice::ObjectPrx listernerObjectPrx = SharedTestData::instance.adapterIn->addWithUUID(mListener);
@@ -154,7 +154,7 @@ void MockBridge::replaceSession(const AsteriskSCF::SessionCommunications::V1::Se
     sessionToReplace->stop(response);
 }
 
-void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx& session)
+void MockBridge::connected(const AsteriskSCF::SessionCommunications::V1::SessionPrx&)
 {
     SharedTestData::instance.mBridgeConnected = true;
 }
diff --git a/test/MockSessionEndpoint.cpp b/test/MockSessionEndpoint.cpp
index a945c70..8bf3f85 100644
--- a/test/MockSessionEndpoint.cpp
+++ b/test/MockSessionEndpoint.cpp
@@ -28,7 +28,7 @@ namespace AsteriskSCF
 namespace RoutingTest
 {
 
-SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionListenerPrx& listener, const Ice::Current&)
+SessionPrx MockSessionEndpoint::createSession(const string& dest, const SessionListenerPrx&, const Ice::Current&)
 {
     string sessionId = dest + "_" + mId + "_" + boost::lexical_cast<string>(++mCounter);
 
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
index 0c5d4c7..f82472d 100644
--- a/test/TestRouting.cpp
+++ b/test/TestRouting.cpp
@@ -68,11 +68,11 @@ void RoutingServiceTest::start(std::string const &name,
     for (Ice::StringSeq::const_iterator i = args.begin(); i != args.end(); ++i)
     {
         argv.push_back(i->c_str());
+	mCachedArgs.argc++;
     }
     // null terminated list
     argv.push_back((char const *) 0);
 
-    mCachedArgs.argc = argv.size() - 1;
     mCachedArgs.argv = (char**)&argv[0];
     mCachedArgs.inheritedProps = communicator->getProperties();
 
@@ -86,7 +86,7 @@ void RoutingServiceTest::stop()
 
 extern "C"
 {
-ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr communicator)
+ASTERISK_SCF_ICEBOX_EXPORT IceBox::Service* create(Ice::CommunicatorPtr)
 {
     return new RoutingServiceTest;
 }

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


-- 
asterisk-scf/release/routing.git



More information about the asterisk-scf-commits mailing list