Bug 1383020 - Add braces to avoid some -Wdangling-else warnings r=jesup
authorSylvestre Ledru <sledru@mozilla.com>
Fri, 21 Jul 2017 13:13:42 +0200
changeset 418859 95efad45c16f1bd202f7246ee421ecac4e03eef5
parent 418858 499d18aed4f008115fd69135abf8988f9f3b7fbb
child 418860 636f4f4833597636f058524674265ff94bff34f2
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1383020
milestone56.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 1383020 - Add braces to avoid some -Wdangling-else warnings r=jesup ASSERT_NE can be on several lines MozReview-Commit-ID: 1SfOdXmeXAf
media/webrtc/signaling/gtest/mediaconduit_unittests.cpp
--- a/media/webrtc/signaling/gtest/mediaconduit_unittests.cpp
+++ b/media/webrtc/signaling/gtest/mediaconduit_unittests.cpp
@@ -372,22 +372,24 @@ class TransportConduitTest : public ::te
   }
 
   //1. Dump audio samples to dummy external transport
   void TestDummyAudioAndTransport()
   {
     //get pointer to AudioSessionConduit
     int err=0;
     mAudioSession = mozilla::AudioSessionConduit::Create();
-    if( !mAudioSession )
+    if( !mAudioSession ) {
       ASSERT_NE(mAudioSession, (void*)nullptr);
+    }
 
     mAudioSession2 = mozilla::AudioSessionConduit::Create();
-    if( !mAudioSession2 )
+    if( !mAudioSession2 ) {
       ASSERT_NE(mAudioSession2, (void*)nullptr);
+    }
 
     WebrtcMediaTransport* xport = new WebrtcMediaTransport();
     ASSERT_NE(xport, (void*)nullptr);
     xport->SetAudioSession(mAudioSession, mAudioSession2);
     mAudioTransport = xport;
 
     // attach the transport to audio-conduit
     err = mAudioSession->SetTransmitterTransport(mAudioTransport);
@@ -431,18 +433,19 @@ class TransportConduitTest : public ::te
   }
 
   void TestVideoConduitCodecAPI()
   {
     int err = 0;
     RefPtr<mozilla::VideoSessionConduit> videoSession;
     //get pointer to VideoSessionConduit
     videoSession = VideoSessionConduit::Create(WebRtcCallWrapper::Create());
-    if( !videoSession )
+    if( !videoSession ) {
       ASSERT_NE(videoSession, (void*)nullptr);
+    }
 
     std::vector<unsigned int> ssrcs = {SSRC};
     videoSession->SetLocalSSRCs(ssrcs);
 
     //Test Configure Recv Codec APIS
     cerr << "   *************************************************" << endl;
     cerr << "    Test Receive Codec Configuration API Now " << endl;
     cerr << "   *************************************************" << endl;
@@ -552,18 +555,19 @@ class TransportConduitTest : public ::te
                                    int max_fs,
                                    unsigned short &new_width,
                                    unsigned short &new_height)
   {
     int err = 0;
 
     // Get pointer to VideoSessionConduit.
     mVideoSession = VideoSessionConduit::Create(WebRtcCallWrapper::Create());
-    if( !mVideoSession )
+    if( !mVideoSession ) {
       ASSERT_NE(mVideoSession, (void*)nullptr);
+    }
 
     std::vector<unsigned int> ssrcs = {SSRC};
     mVideoSession->SetLocalSSRCs(ssrcs);
 
     mozilla::EncodingConstraints constraints;
     constraints.maxFs = max_fs;
     // Configure send codecs on the conduit.
     mozilla::VideoCodecConfig cinst1(120, "VP8", constraints);