Closed
Bug 1392641
Opened 5 years ago
Closed 5 years ago
netwerk/ ignores return values from a functions declared with warn_unused_result
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
(Blocks 1 open bug)
Details
(Whiteboard: [tor][necko-active])
Attachments
(1 file)
/home/worker/workspace/build/src/netwerk/base/BackgroundFileSaver.cpp:911:40: error: ignoring return value of function declared with attribute warn_unused_result [-Werror=unused-result] nssCertList->AddCert(nssCert);
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•5 years ago
|
||
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d64948eba852a8f378fcf35bb60337565cab607e
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → tom
Assignee | ||
Updated•5 years ago
|
Summary: BackgroundFileSaver.cpp ignores a return value from a function declared with warn_unused_result → netwerk/ ignores return values from a functions declared with warn_unused_result
Comment hidden (mozreview-request) |
![]() |
||
Updated•5 years ago
|
Whiteboard: [tor] → [tor][necko-active]
Assignee | ||
Updated•5 years ago
|
Attachment #8899874 -
Flags: review?(daniel)
Comment 4•5 years ago
|
||
mozreview-review |
Comment on attachment 8899874 [details] Bug 1392641 Check return value for functions declared with warn_unused_result https://reviewboard.mozilla.org/r/171208/#review177904 ::: netwerk/system/win32/nsNotifyAddrListener.cpp:217 (Diff revision 2) > sha1.update(combined.get(), combined.Length()); > uint8_t digest[SHA1Sum::kHashSize]; > sha1.finish(digest); > nsCString newString(reinterpret_cast<char*>(digest), > SHA1Sum::kHashSize); > - Base64Encode(newString, output); > + rv = Base64Encode(newString, output); I think you should move the 'rv' declaration to happen just before this (only) use of it. We tend to try to keep the declarations close to the users.
Attachment #8899874 -
Flags: review?(daniel) → review+
Comment 5•5 years ago
|
||
mozreview-review |
Comment on attachment 8899874 [details] Bug 1392641 Check return value for functions declared with warn_unused_result https://reviewboard.mozilla.org/r/171208/#review177906 Just one minor comment.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•5 years ago
|
||
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=cca79dcde65a4a5643ef26d31ecee9f403e9bba9
Comment on attachment 8899874 [details] Bug 1392641 Check return value for functions declared with warn_unused_result https://reviewboard.mozilla.org/r/171208/#review178170 ::: netwerk/system/win32/nsNotifyAddrListener.cpp:217 (Diff revision 3) > uint8_t digest[SHA1Sum::kHashSize]; > sha1.finish(digest); > nsCString newString(reinterpret_cast<char*>(digest), > SHA1Sum::kHashSize); > - Base64Encode(newString, output); > + nsresult rv; > + rv = Base64Encode(newString, output); (nit): nsresult rv = Base64Encode...
Comment hidden (mozreview-request) |
Comment 10•5 years ago
|
||
mozreview-review |
Comment on attachment 8899874 [details] Bug 1392641 Check return value for functions declared with warn_unused_result https://reviewboard.mozilla.org/r/171208/#review178174
Attachment #8899874 -
Flags: review+
Assignee | ||
Updated•5 years ago
|
Keywords: checkin-needed
Comment 11•5 years ago
|
||
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/autoland/rev/56ae3de7d69c Check return value for functions declared with warn_unused_result r=bagder,nwgh
Keywords: checkin-needed
Comment 12•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/56ae3de7d69c
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•