Closed Bug 1257331 Opened 4 years ago Closed 4 years ago

xpcom/glue/standalone/nsXPCOMGlue.cpp(70): warning C4477: 'wprintf' : format string '%s' requires an argument of type 'wchar_t *', but variadic argument 2 has type 'LPVOID'

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

C4477 is getting unmasked in bug 1124033 and it is turning a warning into an error in automation with Visual Studio 2015 Update 1.

I'll send a workaround patch shortly. But the ideal fix is to fix the underlying compiler warning.
As part of unblocking building with VS2015u1 in automation, I'm mass
disabling compiler warnings that are turned into errors. This is not
the preferred mechanism to fix compilation warnings. So hopefully
this patch never lands because someone insists on fixing the underlying
problem instead. But if it does land, hopefully the workaround is
only temporary.

Review commit: https://reviewboard.mozilla.org/r/40603/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40603/
Attachment #8731441 - Flags: review?(nfroyd)
Comment on attachment 8731441 [details]
MozReview Request: Bug 1257331 - Disable C4477 to unblock compilation on VS2015; r?froydnj

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/40603/diff/1-2/
Attachment #8731441 - Flags: review?(nfroyd)
Comment on attachment 8731441 [details]
MozReview Request: Bug 1257331 - Disable C4477 to unblock compilation on VS2015; r?froydnj

https://reviewboard.mozilla.org/r/40603/#review37509

This is the same sort of problem as the previous xpcom build error you fixed; changing the LPVOID here:

http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/standalone/nsXPCOMGlue.cpp#58

to LPWSTR ought to do the trick.
Attachment #8731441 - Attachment is obsolete: true
The Try push was happy. Just waiting on r+.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #8732003 - Flags: review?(nfroyd) → review+
Comment on attachment 8732003 [details]
MozReview Request: Bug 1257331 - Use LPWSTR instead of LPVOID to prevent C4477 warning; r?froydnj

https://reviewboard.mozilla.org/r/40969/#review37879

Thanks!
https://hg.mozilla.org/mozilla-central/rev/72a2ec038f53
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.