< prev index next >

make/src/native/fixpath.c

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -30,21 +30,21 @@
 #include <string.h>
 #include <malloc.h>
 
 void report_error(char const * msg)
 {
-  LPVOID lpMsgBuf;
+  LPTSTR lpMsgBuf = NULL;
   DWORD dw = GetLastError();
 
   FormatMessage(
       FORMAT_MESSAGE_ALLOCATE_BUFFER |
       FORMAT_MESSAGE_FROM_SYSTEM |
       FORMAT_MESSAGE_IGNORE_INSERTS,
       NULL,
       dw,
       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-      (LPTSTR) &lpMsgBuf,
+      &lpMsgBuf,
       0,
       NULL);
 
   fprintf(stderr,
           "%s  Failed with error %d: %s\n",
< prev index next >