Closed
Bug 1476640
Opened 7 years ago
Closed 7 years ago
[Static Analysis] infer errors in media/mtransport/*.
Categories
(Core :: WebRTC: Networking, defect, P3)
Core
WebRTC: Networking
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: rbartlensky, Assigned: rbartlensky)
References
Details
Attachments
(2 files)
media/mtransport/nricectx.cpp:649: error: DEAD_STORE
The value written to &rv (type int) is never used.
647. rv = pref_service->GetBranch(nullptr, getter_AddRefs(pref_branch));
648. if (NS_SUCCEEDED(rv)) {
649. > rv = pref_branch->GetCharPref(
650. "media.peerconnection.nat_simulator.mapping_type",
651. mapping_type);
media/mtransport/nricectx.cpp:652: error: DEAD_STORE
The value written to &rv (type int) is never used.
650. "media.peerconnection.nat_simulator.mapping_type",
651. mapping_type);
652. > rv = pref_branch->GetCharPref(
653. "media.peerconnection.nat_simulator.filtering_type",
654. filtering_type);
media/mtransport/nricectx.cpp:655: error: DEAD_STORE
The value written to &rv (type int) is never used.
653. "media.peerconnection.nat_simulator.filtering_type",
654. filtering_type);
655. > rv = pref_branch->GetBoolPref(
656. "media.peerconnection.nat_simulator.block_udp",
657. &block_udp);
media/mtransport/transportlayerdtls.cpp:1272: error: DEAD_STORE
The value written to &rv (type int) is never used.
1270.
1271. // Checking functions call PR_SetError()
1272. > SECStatus rv = SECFailure;
1273. for (auto digest : digests_) {
1274. rv = CheckDigest(digest, peer_cert);
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8993001 [details]
Bug 1476640: Fix DEAD_STORE errors in media/mtransport/*.
https://reviewboard.mozilla.org/r/257812/#review264780
Looks good to me.
Attachment #8993001 -
Flags: review?(adam) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8993001 [details]
Bug 1476640: Fix DEAD_STORE errors in media/mtransport/*.
https://reviewboard.mozilla.org/r/257812/#review264972
::: media/mtransport/transportlayerdtls.cpp:1272
(Diff revision 2)
> {
> MOZ_ASSERT(digests_.size() != 0);
> // Check all the provided digests
>
> // Checking functions call PR_SetError()
> - SECStatus rv = SECFailure;
> + SECStatus rv;
Sorry to be late to the party, but I think this is a mistaken change. I recognize that it's a dead store but it's better to think of it as just initialization. Is there a way to suppress this error?
Assignee | ||
Comment 5•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8993001 [details]
Bug 1476640: Fix DEAD_STORE errors in media/mtransport/*.
https://reviewboard.mozilla.org/r/257812/#review264972
> Sorry to be late to the party, but I think this is a mistaken change. I recognize that it's a dead store but it's better to think of it as just initialization. Is there a way to suppress this error?
As far as I know you can't silence warnings, only fix them. Two fixes that work are: initialize to something that is 0, in this case `SECSucess`, or do not initialize it.
Comment 6•7 years ago
|
||
In that case, this seems like it's a bad piece of static analysis and we should consider disabling it.
Comment 7•7 years ago
|
||
Please fix the remaining open issue, so we can land this bug.
Flags: needinfo?(rbartlensky)
Keywords: checkin-needed
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Eric Rescorla (:ekr) from comment #6)
> In that case, this seems like it's a bad piece of static analysis and we
> should consider disabling it.
Then I will mark it as a false positive, and revert some of the changes.
Flags: needinfo?(rbartlensky)
Comment hidden (mozreview-request) |
Comment 10•7 years ago
|
||
Can you please upload this to Phabricator. We are using that now.
Assignee | ||
Comment 11•7 years ago
|
||
Comment 12•7 years ago
|
||
Comment on attachment 8993661 [details]
Bug 1476640: Fix DEAD_STORE errors in media/mtransport/*.
Eric Rescorla (:ekr) has approved the revision.
https://phabricator.services.mozilla.com/D2265
Attachment #8993661 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 13•7 years ago
|
||
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b8b952f123c7
Fix DEAD_STORE errors in media/mtransport/*.
Keywords: checkin-needed
Comment 14•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•