Bug 797316 - Fix -Werror=conversion-null errors in Windows-only code (ipc/ part) r=bent

--HG--
extra : rebase_source : e20bd1677b784a9279db1655dea2bcaffb346774
This commit is contained in:
Jacek Caban 2012-10-04 10:32:45 +02:00
parent 867f008412
commit 90ce391b92
5 changed files with 13 additions and 14 deletions

View File

@ -101,7 +101,7 @@ void MessagePumpForUI::ScheduleWork() {
// In order to wake up any cross-process COM calls which may currently be
// pending on the main thread, we also have to post a UI message.
PostMessage(message_hwnd_, WM_NULL, NULL, 0);
PostMessage(message_hwnd_, WM_NULL, 0, 0);
}
void MessagePumpForUI::ScheduleDelayedWork(const Time& delayed_work_time) {
@ -416,7 +416,7 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() {
// MessagePumpForIO public:
MessagePumpForIO::MessagePumpForIO() {
port_.Set(CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, NULL, 1));
port_.Set(CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 1));
DCHECK(port_.IsValid());
}
@ -530,7 +530,7 @@ bool MessagePumpForIO::WaitForIOCompletion(DWORD timeout, IOHandler* filter) {
// Asks the OS for another IO completion result.
bool MessagePumpForIO::GetIOItem(DWORD timeout, IOItem* item) {
memset(item, 0, sizeof(*item));
ULONG_PTR key = NULL;
ULONG_PTR key = 0;
OVERLAPPED* overlapped = NULL;
if (!GetQueuedCompletionStatus(port_.Get(), &item->bytes_transfered, &key,
&overlapped, timeout)) {

View File

@ -24,7 +24,7 @@ DWORD __stdcall ThreadFunc(void* closure) {
PlatformThread::Delegate* delegate =
static_cast<PlatformThread::Delegate*>(closure);
delegate->ThreadMain();
return NULL;
return 0;
}
} // namespace

View File

@ -63,7 +63,7 @@ CrossProcessMutex::ShareToProcess(ProcessHandle aHandle)
HANDLE newHandle;
bool succeeded = ::DuplicateHandle(GetCurrentProcessHandle(),
mMutex, aHandle, &newHandle,
NULL, FALSE, DUPLICATE_SAME_ACCESS);
0, FALSE, DUPLICATE_SAME_ACCESS);
if (!succeeded) {
return NULL;

View File

@ -27,14 +27,14 @@ const int32_t SyncChannel::kNoTimeout = INT32_MIN;
SyncChannel::SyncChannel(SyncListener* aListener)
: AsyncChannel(aListener)
#ifdef OS_WIN
, mTopFrame(NULL)
#endif
, mPendingReply(0)
, mProcessingSyncMessage(false)
, mNextSeqno(0)
, mInTimeoutSecondHalf(false)
, mTimeoutMs(kNoTimeout)
#ifdef OS_WIN
, mTopFrame(NULL)
#endif
{
MOZ_COUNT_CTOR(SyncChannel);
#ifdef OS_WIN

View File

@ -92,7 +92,6 @@ HHOOK gDeferredGetMsgHook = NULL;
HHOOK gDeferredCallWndProcHook = NULL;
DWORD gUIThreadId = 0;
int gEventLoopDepth = 0;
static UINT sAppShellGeckoMsgId;
LRESULT CALLBACK
@ -463,7 +462,7 @@ RestoreWindowProcedure(HWND hWnd)
NS_ASSERTION(oldWndProc != (LONG_PTR)NeuteredWindowProc,
"This shouldn't be possible!");
LONG_PTR currentWndProc =
DebugOnly<LONG_PTR> currentWndProc =
SetWindowLongPtr(hWnd, GWLP_WNDPROC, oldWndProc);
NS_ASSERTION(currentWndProc == (LONG_PTR)NeuteredWindowProc,
"This should never be switched out from under us!");
@ -710,7 +709,7 @@ SyncChannel::WaitForNotify()
bool timedout = false;
UINT_PTR timerId = NULL;
UINT_PTR timerId = 0;
TimeoutData timeoutData = { 0 };
if (mTimeoutMs != kNoTimeout) {
@ -837,7 +836,7 @@ RPCChannel::WaitForNotify()
bool timedout = false;
UINT_PTR timerId = NULL;
UINT_PTR timerId = 0;
TimeoutData timeoutData = { 0 };
// windowHook is used as a flag variable for the loop below: if it is set
@ -857,7 +856,7 @@ RPCChannel::WaitForNotify()
if (timerId) {
KillTimer(NULL, timerId);
timerId = NULL;
timerId = 0;
}
// Used by widget to assert on incoming native events
@ -1042,7 +1041,7 @@ DeferredSettingChangeMessage::DeferredSettingChangeMessage(HWND aHWnd,
}
else {
lParamString = NULL;
lParam = NULL;
lParam = 0;
}
}