Closed Bug 838756 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: DOM: Device Interfaces, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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
Attached 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
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: