[llvm-commits] [llvm] r120868 - /llvm/trunk/lib/Support/Windows/PathV2.inc

Michael J. Spencer bigcheesegs at gmail.com
Fri Dec 3 16:32:14 PST 2010


Author: mspencer
Date: Fri Dec  3 18:32:14 2010
New Revision: 120868

URL: http://llvm.org/viewvc/llvm-project?rev=120868&view=rev
Log:
Support/Windows/FileSystem: Fix MinGW warnings.

Modified:
    llvm/trunk/lib/Support/Windows/PathV2.inc

Modified: llvm/trunk/lib/Support/Windows/PathV2.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/PathV2.inc?rev=120868&r1=120867&r2=120868&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/PathV2.inc (original)
+++ llvm/trunk/lib/Support/Windows/PathV2.inc Fri Dec  3 18:32:14 2010
@@ -70,7 +70,7 @@
   error_code UTF16ToUTF8(const wchar_t *utf16, size_t utf16_len,
                                SmallVectorImpl<char> &utf8) {
     // Get length.
-    int len = ::WideCharToMultiByte(CP_UTF8, NULL,
+    int len = ::WideCharToMultiByte(CP_UTF8, 0,
                                     utf16, utf16_len,
                                     utf8.begin(), 0,
                                     NULL, NULL);
@@ -82,7 +82,7 @@
     utf8.set_size(len);
 
     // Now do the actual conversion.
-    len = ::WideCharToMultiByte(CP_UTF8, NULL,
+    len = ::WideCharToMultiByte(CP_UTF8, 0,
                                 utf16, utf16_len,
                                 utf8.data(), utf8.size(),
                                 NULL, NULL);
@@ -151,7 +151,7 @@
   // Find out how much space we need. Sadly, this function doesn't return the
   // size needed unless you tell it the result size is 0, which means you
   // _always_ have to call it twice.
-  len = ::WideCharToMultiByte(CP_UTF8, NULL,
+  len = ::WideCharToMultiByte(CP_UTF8, 0,
                               cur_path.data(), cur_path.size(),
                               result.data(), 0,
                               NULL, NULL);
@@ -162,7 +162,7 @@
   result.reserve(len);
   result.set_size(len);
   // Now do the actual conversion.
-  len = ::WideCharToMultiByte(CP_UTF8, NULL,
+  len = ::WideCharToMultiByte(CP_UTF8, 0,
                               cur_path.data(), cur_path.size(),
                               result.data(), result.size(),
                               NULL, NULL);
@@ -255,7 +255,7 @@
   if (error_code ec = UTF8ToUTF16(f, wide_from)) return ec;
   if (error_code ec = UTF8ToUTF16(t, wide_to)) return ec;
 
-  if (!create_symbolic_link_api(wide_from.begin(), wide_to.begin(), NULL))
+  if (!create_symbolic_link_api(wide_from.begin(), wide_to.begin(), 0))
     return make_error_code(windows_error(::GetLastError()));
 
   return make_error_code(errc::success);
@@ -460,7 +460,7 @@
                                         NULL,
                                         NULL,
                                         PROV_RSA_FULL,
-                                        NULL);
+                                        0);
   if (!success)
     return make_error_code(windows_error(::GetLastError()));
 





More information about the llvm-commits mailing list