[Static Analysis] DEAD_STORE error in uriloader/exthandler/unix/nsOSHelperAppService.cpp

RESOLVED FIXED in Firefox 63

Status

()

defect
P2
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: rbartlensky, Assigned: rbartlensky)

Tracking

unspecified
mozilla63
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(1 attachment)

uriloader/exthandler/unix/nsOSHelperAppService.cpp:225: error: DEAD_STORE
  The value written to &rv (type int) is never used.
  223.     LOG(("-- LookUpTypeAndDescription for extension '%s'\n",
  224.          NS_LossyConvertUTF16toASCII(aFileExtension).get()));
  225. >   nsresult rv = NS_OK;
  226.     nsAutoString mimeFileName;
  227.
uriloader/exthandler/unix/nsOSHelperAppService.cpp:318: error: DEAD_STORE
  The value written to &rv (type int) is never used.
  316.     LOG(("Using extension '%s'\n",
  317.          NS_LossyConvertUTF16toASCII(aFileExtension).get()));
  318. >   nsresult rv = NS_OK;
  319.     nsCOMPtr<nsIFileInputStream> mimeFile;
  320.     nsCOMPtr<nsILineInputStream> mimeTypes;
uriloader/exthandler/unix/nsOSHelperAppService.cpp:441: error: DEAD_STORE
  The value written to &rv (type int) is never used.
  439.          NS_LossyConvertUTF16toASCII(aMajorType).get(),
  440.          NS_LossyConvertUTF16toASCII(aMinorType).get()));
  441. >   nsresult rv = NS_OK;
  442.     nsAutoString mimeFileName;
  443.
Comment on attachment 8992384 [details]
Bug 1476015: Fix DEAD_STORE issues reported by infer.

https://reviewboard.mozilla.org/r/257238/#review264070

Thank you!

::: commit-message-2ed15:1
(Diff revision 1)
> +Bug 1476015: Fix DEAD_STORE issues.

Perhaps this should say "Fix DEAD_STORE issues reported by Coverity"?
Attachment #8992384 - Flags: review?(nfroyd) → review+
Sure, I will change it now.
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99ac85a273af
Fix DEAD_STORE issues reported by infer. r=froydnj
Keywords: checkin-needed
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/99ac85a273af
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.