Просмотр исходного кода

Fixed compilation with libnice

Paul-Louis Ageneau 5 лет назад
Родитель
Сommit
8b1a67760c
2 измененных файлов с 13 добавлено и 11 удалено
  1. 10 9
      src/icetransport.cpp
  2. 3 2
      src/icetransport.hpp

+ 10 - 9
src/icetransport.cpp

@@ -622,7 +622,8 @@ void IceTransport::CandidateCallback(NiceAgent *agent, NiceCandidate *candidate,
 	g_free(cand);
 	g_free(cand);
 }
 }
 
 
-void IceTransport::GatheringDoneCallback(NiceAgent *agent, guint streamId, gpointer userData) {
+void IceTransport::GatheringDoneCallback(NiceAgent * /*agent*/, guint /*streamId*/,
+                                         gpointer userData) {
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	try {
 	try {
 		iceTransport->processGatheringDone();
 		iceTransport->processGatheringDone();
@@ -631,8 +632,8 @@ void IceTransport::GatheringDoneCallback(NiceAgent *agent, guint streamId, gpoin
 	}
 	}
 }
 }
 
 
-void IceTransport::StateChangeCallback(NiceAgent *agent, guint streamId, guint componentId,
-                                       guint state, gpointer userData) {
+void IceTransport::StateChangeCallback(NiceAgent * /*agent*/, guint /*streamId*/,
+                                       guint /*componentId*/, guint state, gpointer userData) {
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	try {
 	try {
 		iceTransport->processStateChange(state);
 		iceTransport->processStateChange(state);
@@ -641,8 +642,8 @@ void IceTransport::StateChangeCallback(NiceAgent *agent, guint streamId, guint c
 	}
 	}
 }
 }
 
 
-void IceTransport::RecvCallback(NiceAgent *agent, guint streamId, guint componentId, guint len,
-                                gchar *buf, gpointer userData) {
+void IceTransport::RecvCallback(NiceAgent * /*agent*/, guint /*streamId*/, guint /*componentId*/,
+                                guint len, gchar *buf, gpointer userData) {
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	auto iceTransport = static_cast<rtc::IceTransport *>(userData);
 	try {
 	try {
 		PLOG_VERBOSE << "Incoming size=" << len;
 		PLOG_VERBOSE << "Incoming size=" << len;
@@ -663,8 +664,8 @@ gboolean IceTransport::TimeoutCallback(gpointer userData) {
 	return FALSE;
 	return FALSE;
 }
 }
 
 
-void IceTransport::LogCallback(const gchar *logDomain, GLogLevelFlags logLevel,
-                               const gchar *message, gpointer userData) {
+void IceTransport::LogCallback(const gchar * /*logDomain*/, GLogLevelFlags logLevel,
+                               const gchar *message, gpointer /*userData*/) {
 	plog::Severity severity;
 	plog::Severity severity;
 	unsigned int flags = logLevel & G_LOG_LEVEL_MASK;
 	unsigned int flags = logLevel & G_LOG_LEVEL_MASK;
 	if (flags & G_LOG_LEVEL_ERROR)
 	if (flags & G_LOG_LEVEL_ERROR)
@@ -708,7 +709,7 @@ bool IceTransport::getSelectedCandidatePair(CandidateInfo *localInfo, CandidateI
 	return true;
 	return true;
 }
 }
 
 
-const CandidateType IceTransport::NiceTypeToCandidateType(NiceCandidateType type) {
+CandidateType IceTransport::NiceTypeToCandidateType(NiceCandidateType type) {
 	switch (type) {
 	switch (type) {
 	case NiceCandidateType::NICE_CANDIDATE_TYPE_PEER_REFLEXIVE:
 	case NiceCandidateType::NICE_CANDIDATE_TYPE_PEER_REFLEXIVE:
 		return CandidateType::PeerReflexive;
 		return CandidateType::PeerReflexive;
@@ -721,7 +722,7 @@ const CandidateType IceTransport::NiceTypeToCandidateType(NiceCandidateType type
 	}
 	}
 }
 }
 
 
-const CandidateTransportType
+CandidateTransportType
 IceTransport::NiceTransportTypeToCandidateTransportType(NiceCandidateTransport type) {
 IceTransport::NiceTransportTypeToCandidateTransportType(NiceCandidateTransport type) {
 	switch (type) {
 	switch (type) {
 	case NiceCandidateTransport::NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE:
 	case NiceCandidateTransport::NICE_CANDIDATE_TRANSPORT_TCP_ACTIVE:

+ 3 - 2
src/icetransport.hpp

@@ -113,8 +113,9 @@ private:
 	static gboolean TimeoutCallback(gpointer userData);
 	static gboolean TimeoutCallback(gpointer userData);
 	static void LogCallback(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message,
 	static void LogCallback(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message,
 	                        gpointer user_data);
 	                        gpointer user_data);
-	static const CandidateType NiceTypeToCandidateType(NiceCandidateType type);
-	static const CandidateTransportType NiceTransportTypeToCandidateTransportType(NiceCandidateTransport type);
+	static CandidateType NiceTypeToCandidateType(NiceCandidateType type);
+	static CandidateTransportType
+	NiceTransportTypeToCandidateTransportType(NiceCandidateTransport type);
 #endif
 #endif
 };
 };