Closed
Bug 560393
Opened 15 years ago
Closed 15 years ago
Fix warning: format [FORMAT] expects type [TYPE], but argument [N] has type [OTHER TYPE]
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
References
()
Details
(Whiteboard: [build_warning])
Attachments
(3 files)
1.03 KB,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
8.72 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
975 bytes,
patch
|
jduell.mcbugs
:
review+
|
Details | Diff | Splinter Review |
Filing this bug on fixing warnings of the form:
> format [FORMAT] expects type [TYPE], but argument [N] has type [OTHER TYPE]
In the 32-bit OS X clobber build linked in URL field, there are 19 of these. (I tripped over one of them when doing a tryserver build with warnings-as-errors enabled in certain warning-free-on-linux directories.)
Assignee | ||
Comment 1•15 years ago
|
||
This patch fixes two instances of this warning:
> toolkit/components/places/tests/cpp/places_test_harness_tail.h:118: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
> toolkit/components/places/tests/cpp/places_test_harness_tail.h:118: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
Assignee | ||
Comment 2•15 years ago
|
||
(er, it fixes those two warnings, I meant.)
Assignee | ||
Comment 3•15 years ago
|
||
This patch addresses these build warnings:
> xpcom/typelib/xpt/tools/xpt_dump.c:230: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
> xpcom/typelib/xpt/tools/xpt_dump.c:230: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
> xpcom/typelib/xpt/tools/xpt_link.c:239: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
> xpcom/typelib/xpt/tools/xpt_link.c:239: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
> xpcom/components/nsNativeComponentLoader.cpp:176: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'nsresult'
> xpcom/tests/TestCOMPtr.cpp:371: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:463: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:530: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:595: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:664: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:732: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:808: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestHashtables.cpp:882: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
> xpcom/tests/TestRefPtr.cpp:371: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
Attachment #443557 -
Flags: review?(benjamin)
Assignee | ||
Comment 4•15 years ago
|
||
This patch adds "unsigned long" casts to address these warnings:
> netwerk/test/TestIncrementalDownload.cpp:76: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'PRUint32'
> netwerk/test/TestIncrementalDownload.cpp:76: warning: format '%lu' expects type 'long unsigned int', but argument 3 has type 'PRUint32'
Attachment #443558 -
Flags: review?
Assignee | ||
Updated•15 years ago
|
Attachment #443558 -
Flags: review? → review?(jduell.mcbugs)
Assignee | ||
Updated•15 years ago
|
Blocks: FAIL_ON_WARNINGS
Assignee | ||
Updated•15 years ago
|
Whiteboard: [build_warning]
Comment 5•15 years ago
|
||
Comment on attachment 443543 [details] [diff] [review]
Part 1: fix for places directory [landed]
r=sdwilsh
Attachment #443543 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 6•15 years ago
|
||
Comment on attachment 443543 [details] [diff] [review]
Part 1: fix for places directory [landed]
Landed part 1: http://hg.mozilla.org/mozilla-central/rev/95744c36212c
Attachment #443543 -
Attachment description: Part 1: fix for places directory → Part 1: fix for places directory [landed]
Updated•15 years ago
|
Attachment #443558 -
Flags: review?(jduell.mcbugs) → review+
Assignee | ||
Comment 7•15 years ago
|
||
Comment on attachment 443558 [details] [diff] [review]
Part 3: fix for netwerk directory [landed]
Landed part 3: http://hg.mozilla.org/mozilla-central/rev/95d99c944202
Attachment #443558 -
Attachment description: Part 3: fix for netwerk directory → Part 3: fix for netwerk directory [landed]
Updated•15 years ago
|
Attachment #443557 -
Flags: review?(benjamin) → review+
Assignee | ||
Comment 8•15 years ago
|
||
Comment on attachment 443557 [details] [diff] [review]
Part 2: fix for xpcom directory [landed]
Landed part 2: http://hg.mozilla.org/mozilla-central/rev/5c2d7b8d9e7c
Attachment #443557 -
Attachment description: Part 2: fix for xpcom directory → Part 2: fix for xpcom directory [landed]
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•