The default bug view has changed. See this FAQ.

546 lines of build warning spam from "NeckoMessageUtils.h:* warning: unused variable 'rv'"

RESOLVED FIXED

Status

()

Core
Networking
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [build_warning] , URL)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
When building an opt build, we get 546 lines of this build-warning-spam:
> NeckoMessageUtils.h: In static member function 'static void IPC::ParamTraits<IPC::InputStream>::Write(IPC::Message*, const IPC::ParamTraits<IPC::InputStream>::paramType&)':
> NeckoMessageUtils.h:219:18: warning: unused variable 'rv'
> NeckoMessageUtils.h:230:14: warning: unused variable 'rv'

(Apparently lots of files include that header, directly or indirectly)
(Assignee)

Updated

6 years ago
OS: Linux → All
Hardware: x86_64 → All
Summary: 550 lines of build warning spam from "NeckoMessageUtils.h:* warning: unused variable 'rv'" → 546 lines of build warning spam from "NeckoMessageUtils.h:* warning: unused variable 'rv'"
(Assignee)

Updated

6 years ago
(Assignee)

Comment 1

6 years ago
Created attachment 532321 [details] [diff] [review]
fix: use mozilla::DebugOnly<nsresult>

This fixes these spots using the magical new DebugOnly template.*

I've also fixed one existing instance of...
  #ifdef DEBUG
     nsresult rv = 
  #endif
      // some expression
      // sanity-check rv

...to use DebugOnly, too.

* https://developer.mozilla.org/index.php?title=En/Namespace/Mozilla/DebugOnly%3CT%3E
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
(Assignee)

Updated

6 years ago
Attachment #532321 - Flags: review?(jduell.mcbugs)
Comment on attachment 532321 [details] [diff] [review]
fix: use mozilla::DebugOnly<nsresult>

What do you know--every once in a while C++ is actually slick in an almost straightforward way.   Thanks for the patch!
Attachment #532321 - Flags: review?(jduell.mcbugs) → review+
Keywords: checkin-needed
(Assignee)

Comment 3

6 years ago
Thanks for the speedy review!
http://hg.mozilla.org/projects/cedar/rev/cf70935c912b
Keywords: checkin-needed
Whiteboard: [build_warning] → [build_warning] fixed-in-cedar
http://hg.mozilla.org/mozilla-central/rev/cf70935c912b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning] fixed-in-cedar → [build_warning]
You need to log in before you can comment on or make changes to this bug.