Fix -Wreorder and -Wsign-compare warnings in nsThreadPool.cpp

RESOLVED FIXED in Firefox 30

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

(Blocks 1 bug, {regression})

unspecified
mozilla30
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox29 unaffected, firefox30 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

The following clang warnings were introduced by bug 968016:

xpcom/threads/nsThreadPool.cpp:55:5 [-Wreorder] field 'mStackSize' will be initialized after field 'mIdleCount'

xpcom/threads/nsThreadPool.cpp:259:26 [-Wsign-compare] comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int32_t' (aka 'int')
Attachment #8377410 - Flags: review?(benjamin)
Comment on attachment 8377410 [details] [diff] [review]
fix-nsThreadPool-warnings.patch

Review of attachment 8377410 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/base/nsConsoleService.cpp
@@ +139,5 @@
>      mService->EnumerateListeners(CollectCurrentListeners, &listeners);
>  
>      mService->SetIsDelivering();
>  
> +    for (uint32_t i = 0; i < listeners.Count(); ++i)

Looks like the *adds* a warning: nsCOMArray::Count returns int32_t; nsCOMArray::Length returns uint32_t.
oops, I forgot to hg qrefresh some patch changes.
Attachment #8377410 - Attachment is obsolete: true
Attachment #8377410 - Flags: review?(benjamin)
Attachment #8377414 - Flags: review?(benjamin)
(In reply to :Ms2ger from comment #1)
> Looks like the *adds* a warning: nsCOMArray::Count returns int32_t;
> nsCOMArray::Length returns uint32_t.

yes, that was a mistake. I forgot one final hg qrefresh before posting my initial patch. :\
Attachment #8377414 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/ed161be44ec3
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.