Closed
Bug 552329
Opened 14 years ago
Closed 14 years ago
Fix GCC warnings in TestOOM.cpp
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
Details
(Whiteboard: [build_warning])
Attachments
(1 file)
1.81 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
I get these compile warnings when building mozilla-central on Linux, in TestOOM.cpp:
>../../../mozilla/xpcom/tests/TestOOM.cpp: In function ‘int main(int, char**)’:
>../../../mozilla/xpcom/tests/TestOOM.cpp:80: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’
>../../../mozilla/xpcom/tests/TestOOM.cpp:83: warning: comparison between signed and unsigned integer expressions
>../../../mozilla/xpcom/tests/TestOOM.cpp:95: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘unsigned int’
>../../../mozilla/xpcom/tests/TestOOM.cpp:64: warning: unused variable ‘big_alloc’
I'm filing this bug on fixing these warnings.
Assignee | ||
Comment 1•14 years ago
|
||
Fixed in this patch: - Use (void) to indicate that it's ok we're not using variable 'big_alloc' - s/%ld/%lu/ in printf formats - Cast the corresponding printf arg to be an unsigned long (since size_t doesn't necessarily occupy the same number of bytes as 'unsigned' or 'unsigned long') - s/int/size_t/ in loop variable (to fix signed/unsigned comparison) - Replace tabs with spaces
Comment 2•14 years ago
|
||
Comment on attachment 432495 [details] [diff] [review] fix rs
Attachment #432495 -
Flags: review?(dougt) → review+
Assignee | ||
Updated•14 years ago
|
Whiteboard: [build_warning]
Assignee | ||
Comment 3•14 years ago
|
||
Landed 2 months back, but forgot to note here & close bug: http://hg.mozilla.org/mozilla-central/rev/138f593553b6
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•