Closed Bug 1476644 Opened 6 years ago Closed 6 years ago

[Static Analysis] DEAD_STORE in media/webrtc/signaling/gtest/videoconduit_unittests.cpp

Categories

(Core :: WebRTC: Signaling, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: rbartlensky, Assigned: rbartlensky)

References

Details

Attachments

(1 file)

media/webrtc/signaling/gtest/videoconduit_unittests.cpp:783: error: DEAD_STORE
  The value written to &ec (type int) is never used.
  781.     codecConfig.mSimulcastEncodings.push_back(encoding2);
  782.     codecConfig.mSimulcastEncodings.push_back(encoding3);
  783. >   ec = mVideoConduit->ConfigureCodecMode(webrtc::VideoCodecMode::kScreensharing);
  784.     ec = mVideoConduit->ConfigureSendMediaCodec(&codecConfig);
  785.     ASSERT_EQ(ec, kMediaConduitNoError);
Comment on attachment 8993004 [details]
Bug 1476644: Fix DEAD_STORE error in media/webrtc/signaling/gtest/videoconduit_unittests.cpp.

https://reviewboard.mozilla.org/r/257816/#review264752

::: media/webrtc/signaling/gtest/videoconduit_unittests.cpp:785
(Diff revision 1)
>  
>    VideoCodecConfig codecConfig(120, "VP8", constraints);
>    codecConfig.mSimulcastEncodings.push_back(encoding);
>    codecConfig.mSimulcastEncodings.push_back(encoding2);
>    codecConfig.mSimulcastEncodings.push_back(encoding3);
> -  ec = mVideoConduit->ConfigureCodecMode(webrtc::VideoCodecMode::kScreensharing);
> +  Unused << mVideoConduit->ConfigureCodecMode(webrtc::VideoCodecMode::kScreensharing);

Rather than ignoring the return code, you should be checking it, with an ASSERT_EQ() like that on line 785
Attachment #8993004 - Flags: review?(ekr) → review-
Comment on attachment 8993004 [details]
Bug 1476644: Fix DEAD_STORE error in media/webrtc/signaling/gtest/videoconduit_unittests.cpp.

https://reviewboard.mozilla.org/r/257816/#review265212
Attachment #8993004 - Flags: review?(ekr) → review+
Keywords: checkin-needed
:rbrtiensky i tried to land this through mozzreview but i can't it still has an opened issue. 
Please take a look, fix it and then set the checkin-needed.
Thank you
Flags: needinfo?(rbartlensky)
(In reply to Andreea Pavel [:apavel] from comment #5)
> :rbrtiensky i tried to land this through mozzreview but i can't it still has
> an opened issue. 
> Please take a look, fix it and then set the checkin-needed.
> Thank you

Sorry about that, I closed it now.
Flags: needinfo?(rbartlensky)
Keywords: checkin-needed
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6259a3d0d8a3
Fix DEAD_STORE error in media/webrtc/signaling/gtest/videoconduit_unittests.cpp. r=ekr
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6259a3d0d8a3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: