Bug 1256464 - Use LPSTR instead of LPVOID to avoid C4477 on VS2015; r=froydnj
authorGregory Szorc <gps@mozilla.com>
Mon, 14 Mar 2016 17:18:42 -0700
changeset 288673 ba45f827d74b3103f151eb75827713eab8f9368b
parent 288672 0737c6bd21e634dccceb7e13fee30e972d7c7835
child 288674 9b9dde0705bdcd960e78bbab5083ae7a1543e33b
push id18174
push usercbook@mozilla.com
push dateTue, 15 Mar 2016 09:44:58 +0000
treeherderfx-team@dd0baa33759d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1256464
milestone48.0a1
Bug 1256464 - Use LPSTR instead of LPVOID to avoid C4477 on VS2015; r=froydnj Without this change, Visual Studio 2015 complains: mozglue/misc/StackWalk.cpp(261): warning C4477: 'fprintf' : format string '%s' requires an argument of type 'char *', but variadic argument 2 has type 'LPVOID' MozReview-Commit-ID: HIAs5L57Nd1
mozglue/misc/StackWalk.cpp
--- a/mozglue/misc/StackWalk.cpp
+++ b/mozglue/misc/StackWalk.cpp
@@ -242,17 +242,17 @@ struct WalkStackData
 
 DWORD gStackWalkThread;
 CRITICAL_SECTION gDbgHelpCS;
 
 // Routine to print an error message to standard error.
 static void
 PrintError(const char* aPrefix)
 {
-  LPVOID lpMsgBuf;
+  LPSTR lpMsgBuf;
   DWORD lastErr = GetLastError();
   FormatMessageA(
     FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
     nullptr,
     lastErr,
     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
     (LPSTR)&lpMsgBuf,
     0,