[Static Analysis] DEAD_STORE error in dom/indexedDB/ActorsParent.cpp

RESOLVED FIXED in Firefox 63

Status

()

defect
P3
normal
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: rbartlensky, Assigned: rbartlensky)

Tracking

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

dom/indexedDB/ActorsParent.cpp:3946: error: DEAD_STORE
  The value written to &rv (type int) is never used.
    3944.     UniqueFreePtr<uint8_t> newIdv;
    3945.     uint32_t newIdvLength;
    3946. >   rv = MakeCompressedIndexDataValues(oldIdv, newIdv, &newIdvLength);
    3947.
    3948.     std::pair<uint8_t*, int> data(newIdv.release(), newIdvLength);
Comment hidden (mozreview-request)

Comment 2

10 months ago
mozreview-review
Comment on attachment 8993313 [details]
Bug 1476603: Fix DEAD_STORE error in dom/indexedDB/ActorsParent.cpp.

https://reviewboard.mozilla.org/r/258090/#review265040

::: dom/indexedDB/ActorsParent.cpp:3946
(Diff revision 1)
>      return rv;
>    }
>  
>    UniqueFreePtr<uint8_t> newIdv;
>    uint32_t newIdvLength;
> -  rv = MakeCompressedIndexDataValues(oldIdv, newIdv, &newIdvLength);
> +  Unused << MakeCompressedIndexDataValues(oldIdv, newIdv, &newIdvLength);

Why not add:
if (NS_WARN_IF(NS_FAILED(rv))) {
  return rv;
}
  
?
Comment hidden (mozreview-request)

Comment 4

10 months ago
mozreview-review
Comment on attachment 8993313 [details]
Bug 1476603: Fix DEAD_STORE error in dom/indexedDB/ActorsParent.cpp.

https://reviewboard.mozilla.org/r/258090/#review265044

::: dom/indexedDB/ActorsParent.cpp:3949
(Diff revision 2)
>    UniqueFreePtr<uint8_t> newIdv;
>    uint32_t newIdvLength;
>    rv = MakeCompressedIndexDataValues(oldIdv, newIdv, &newIdvLength);
> -
> +  if (NS_WARN_IF(NS_FAILED(rv))) {
> +    return rv;
> +  }

Nit: add a blank line
Attachment #8993313 - Flags: review+
Comment hidden (mozreview-request)
Assignee

Updated

10 months ago
Keywords: checkin-needed

Comment 6

10 months ago
Pushed by ccoroiu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f73954c5633
Fix DEAD_STORE error in dom/indexedDB/ActorsParent.cpp. r=janv
Keywords: checkin-needed

Comment 7

10 months ago
mozreview-review
Comment on attachment 8993313 [details]
Bug 1476603: Fix DEAD_STORE error in dom/indexedDB/ActorsParent.cpp.

https://reviewboard.mozilla.org/r/258090/#review265270

Comment 4 has "Flags: review+" but I don't see it on this attachment. Not sure what's going on, but this clearly doesn't need a review from me at this point.
Attachment #8993313 - Flags: review?(n.nethercote)
Assignee

Comment 8

10 months ago
(In reply to Nicholas Nethercote [:njn] from comment #7)
> Comment on attachment 8993313 [details]
> Bug 1476603: Fix DEAD_STORE error in dom/indexedDB/ActorsParent.cpp.
> 
> https://reviewboard.mozilla.org/r/258090/#review265270
> 
> Comment 4 has "Flags: review+" but I don't see it on this attachment. Not
> sure what's going on, but this clearly doesn't need a review from me at this
> point.

Yes, sorry about that! I put the wrong name in the reviewers section.

Comment 9

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