Closed Bug 557380 Opened 15 years ago Closed 15 years ago

TestUnicodeArguments.cpp is missing an argument to printf

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

(Whiteboard: [build_warning])

Attachments

(1 file)

> ../../../mozilla/xpcom/tests/TestUnicodeArguments.cpp: In function ‘int main(int, char**)’: > ../../../mozilla/xpcom/tests/TestUnicodeArguments.cpp:69: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘char*’ > ../../../mozilla/xpcom/tests/TestUnicodeArguments.cpp:69: warning: too few arguments for format Code is: > 68 for (int i = 1; i < argc; ++i) { > 69 printf("argv[%d] = %s; expected = %s\n", argv[i], expected_utf8[i - 1]); Looks like we want to pass one additional argument to printf -- that argument being "i" and going right after the format string.
Attached patch fixSplinter Review
Attachment #437162 - Flags: review?(smontagu)
Comment on attachment 437162 [details] [diff] [review] fix Thanks for catching this!
Attachment #437162 - Flags: review?(smontagu) → review+
No prob, thanks for the quick review! I nixed a few instances of end-of-line whitespace that I noticed in TestUnicodeArguments.cpp, too. Pushed: http://hg.mozilla.org/mozilla-central/rev/bb573cd864b1
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: