Bug 1020379 - [RTSP] Fix trivial compile warnings. r=sworkman
authorEthan Tseng <ettseng@mozilla.com>
Fri, 06 Jun 2014 11:28:45 +0800
changeset 207570 722c6e0845eb77ca18bf5b686eb5609e8efcb17d
parent 207569 cea5bf661931f3abd532bc1df0d5796463a8ab1f
child 207571 f4f3b1e4a0e51e60702c22b90f526ca3a21b1f0f
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssworkman
bugs1020379
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1020379 - [RTSP] Fix trivial compile warnings. r=sworkman
netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
netwerk/protocol/rtsp/rtsp/ARTSPConnection.cpp
netwerk/protocol/rtsp/rtsp/RTSPConnectionHandler.h
--- a/netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
+++ b/netwerk/protocol/rtsp/rtsp/ARTPConnection.cpp
@@ -273,17 +273,17 @@ void ARTPConnection::onPollStreams() {
         return;
     }
 
     uint32_t pollCount = mStreams.size() * 2;
     PRPollDesc *pollList = (PRPollDesc *)
         moz_xcalloc(pollCount, sizeof(PRPollDesc));
 
     // |pollIndex| is used to map different RTP & RTCP socket pairs.
-    int numSocketsToPoll = 0, pollIndex = 0;
+    uint32_t numSocketsToPoll = 0, pollIndex = 0;
     for (List<StreamInfo>::iterator it = mStreams.begin();
          it != mStreams.end(); ++it, pollIndex += 2) {
         if (pollIndex >= pollCount) {
             // |pollIndex| should never equal or exceed |pollCount|.
             TRESPASS();
         }
 
         if ((*it).mIsInjected) {
--- a/netwerk/protocol/rtsp/rtsp/ARTSPConnection.cpp
+++ b/netwerk/protocol/rtsp/rtsp/ARTSPConnection.cpp
@@ -51,20 +51,20 @@ const uint32_t ARTSPConnection::kSocketP
 const uint32_t ARTSPConnection::kSocketPollTimeoutRetries = 10000;
 const uint32_t ARTSPConnection::kSocketBlokingRecvTimeout = 10;
 
 ARTSPConnection::ARTSPConnection(bool uidValid, uid_t uid)
     : mUIDValid(uidValid),
       mUID(uid),
       mState(DISCONNECTED),
       mAuthType(NONE),
-      mSocket(nullptr),
       mConnectionID(0),
       mNextCSeq(0),
       mReceiveResponseEventPending(false),
+      mSocket(nullptr),
       mNumSocketPollTimeoutRetries(0) {
     MakeUserAgent(&mUserAgent);
 }
 
 ARTSPConnection::~ARTSPConnection() {
     if (mSocket) {
         LOGE("Connection is still open, closing the socket.");
         closeSocket();
--- a/netwerk/protocol/rtsp/rtsp/RTSPConnectionHandler.h
+++ b/netwerk/protocol/rtsp/rtsp/RTSPConnectionHandler.h
@@ -36,20 +36,16 @@
 #include "nsPrintfCString.h"
 
 #include "prlog.h"
 
 #include "prio.h"
 #include "prnetdb.h"
 
 extern PRLogModuleInfo* gRtspLog;
-#define LOGI(msg, ...) PR_LOG(gRtspLog, PR_LOG_ALWAYS, ("RTSP" msg, ##__VA_ARGS__))
-#define LOGV(msg, ...) PR_LOG(gRtspLog, PR_LOG_DEBUG, (msg, ##__VA_ARGS__))
-#define LOGE(msg, ...) PR_LOG(gRtspLog, PR_LOG_ERROR, (msg, ##__VA_ARGS__))
-#define LOGW(msg, ...) PR_LOG(gRtspLog, PR_LOG_WARNING, (msg, ##__VA_ARGS__))
 
 // If no access units are received within 2 secs, assume that the rtp
 // stream has ended and signal end of stream.
 static int64_t kAccessUnitTimeoutUs = 2000000ll;
 
 // If no access units arrive for the first 10 secs after starting the
 // stream, assume none ever will and signal EOS or switch transports.
 static int64_t kPlayTimeoutUs = 10000000ll;