Closed
Bug 1392641
Opened 8 years ago
Closed 8 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
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•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → tom
Assignee | ||
Updated•8 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•8 years ago
|
Whiteboard: [tor] → [tor][necko-active]
Assignee | ||
Updated•8 years ago
|
Attachment #8899874 -
Flags: review?(daniel)
Comment 4•8 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•8 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•8 years ago
|
||
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•8 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•8 years ago
|
Keywords: checkin-needed
Comment 11•8 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•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 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
•