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

RESOLVED FIXED in Firefox 63

Status

()

defect
P3
normal
RESOLVED FIXED
9 months ago
9 months ago

People

(Reporter: rbartlensky, Assigned: rbartlensky)

Tracking

unspecified
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 months ago
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 2

9 months ago
mozreview-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/#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 hidden (mozreview-request)

Comment 4

9 months ago
mozreview-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+
(Assignee)

Updated

9 months ago
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)
(Assignee)

Comment 6

9 months ago
(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)
(Assignee)

Updated

9 months ago
Keywords: checkin-needed

Comment 7

9 months ago
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

Comment 8

9 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6259a3d0d8a3
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.