Closed Bug 1476603 Opened 6 years ago Closed 6 years ago

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

Categories

(Core :: Storage: IndexedDB, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: rbartlensky, Assigned: rbartlensky)

References

Details

Attachments

(1 file)

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 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 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+
Keywords: checkin-needed
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 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)
(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.
https://hg.mozilla.org/mozilla-central/rev/7f73954c5633
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: