build warning for out-of-order UnixSocketImpl init list, in UnixSocket.cpp

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

(Blocks 1 bug)

Trunk
mozilla21
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

New build warning:
{
UnixSocket.cpp
/mozilla-central/mozilla/ipc/unixsocket/UnixSocket.cpp: In constructor 'mozilla::ipc::UnixSocketImpl::UnixSocketImpl(mozilla::ipc::UnixSocketConsumer*, mozilla::ipc::UnixSocketConnector*, const nsACString_internal&)':
/mozilla-central/mozilla/ipc/unixsocket/UnixSocket.cpp:238:19: warning: 'mozilla::ipc::UnixSocketImpl::mTask' will be initialized after [-Wreorder]
/mozilla-central/mozilla/ipc/unixsocket/UnixSocket.cpp:222:15: warning:   'mozilla::ScopedClose mozilla::ipc::UnixSocketImpl::mFd' [-Wreorder]
/mozilla-central/mozilla/ipc/unixsocket/UnixSocket.cpp:46:3: warning:   when initialized here [-Wreorder]
}

introduced by bug 826931 inserting mTask(nullptr) at the wrong point in the init list.
Er, copypaste fail -- I meant to say "bug 836107" at the end of comment 0.
 (this cset: https://hg.mozilla.org/releases/mozilla-b2g18/rev/9fa5629ee60c )
Blocks: 836107
No longer blocks: 826931
Posted patch fixSplinter Review
This fixes the warning.

As shown by this MXR page, mTask is declared right after mCurrentTaskIsCanceled:
https://mxr.mozilla.org/mozilla-central/source/ipc/unixsocket/UnixSocket.cpp?mark=232-238#229
...so it should be right after mCurrentTaskIsCanceled in the init list, too. (And this patch makes it so.)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #710849 - Flags: review?(kyle)
Attachment #710849 - Flags: review?(kyle) → review+
Blocks: 838840
https://hg.mozilla.org/mozilla-central/rev/d9708e34085a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.