diff --git a/sflphone-common/src/managerimpl.cpp b/sflphone-common/src/managerimpl.cpp
index b994f4b02f502853ea851926157b380f82dd19b1..9b28e568e16ed6f97a26417a017e5d47a1b97bc6 100644
--- a/sflphone-common/src/managerimpl.cpp
+++ b/sflphone-common/src/managerimpl.cpp
@@ -182,38 +182,6 @@ void ManagerImpl::switchCall (const CallID& id) {
 	ost::MutexLock m(_currentCallMutex);
 	_debug ("----- Switch current call id to %s -----", id.c_str());
 	_currentCallId2 = id;
-
-	/*
-	 AudioLayer *al = getAudioDriver();
-
-	 if (id != "") {
-
-	 if(isConference(id)) {
-
-	 Conference *conf;
-
-	 ConferenceMap::iterator iter = _conferencemap.find(id);
-	 if(iter != _conferencemap.end())
-	 {
-	 _debug("    set call recordable in audio layer");
-	 conf = iter->second;
-	 al->setRecorderInstance((Recordable*)conf);
-	 }
-	 }
-	 else {
-
-	 // set the recordable instance in audiolayer
-	 AccountID account_id = getAccountFromCall(id);
-
-
-	 Call *call = NULL;
-	 call = getAccountLink (account_id)->getCall(id);
-
-	 _debug("    set call recordable in audio layer");
-	 al->setRecorderInstance((Recordable*)call);
-	 }
-	 }
-	 */
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -3218,7 +3186,7 @@ std::map<std::string, std::string> ManagerImpl::getAccountDetails (
 	a.insert(std::pair<std::string, std::string>(ACCOUNT_DTMF_TYPE, getConfigString(
 				accountID, ACCOUNT_DTMF_TYPE)));
 
-	RegistrationState state;
+	RegistrationState state = Unregistered;
 	std::string registrationStateCode;
 	std::string registrationStateDescription;
 
@@ -3235,8 +3203,6 @@ std::map<std::string, std::string> ManagerImpl::getAccountDetails (
 			registrationStateDescription
 					= account->getRegistrationStateDetailed().second;
 		}
-	} else {
-		state = Unregistered;
 	}
 
 	(accountID == IP2IP_PROFILE) ? a.insert(
diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp
index 22310598b4ac775fbb58f462033aa1e4ede7ab3c..069e26cb419498f537802eb58534c9311b33c79c 100644
--- a/sflphone-common/src/sip/sipvoiplink.cpp
+++ b/sflphone-common/src/sip/sipvoiplink.cpp
@@ -2976,7 +2976,6 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
     _debug ("UserAgent: Call state changed to %s", invitationStateMap[inv->state]);
 
     pjsip_rx_data *rdata;
-    pj_status_t status = PJ_SUCCESS;
 
     /* Retrieve the call information */
     SIPCall * call = NULL;