• R/O
  • SSH
  • HTTPS

hamigaki: 提交


Commit MetaInfo

修訂1758 (tree)
時間2009-11-14 17:28:34
作者hamigaki

Log Message

suppressed warnings for x64

Change Summary

差異

--- hamigaki/trunk/libs/filesystem/src/windows/reparse_point.hpp (revision 1757)
+++ hamigaki/trunk/libs/filesystem/src/windows/reparse_point.hpp (revision 1758)
@@ -1,6 +1,6 @@
11 // reparse_point.hpp: the functions for the reparse points
22
3-// Copyright Takeshi Mouri 2006-2008.
3+// Copyright Takeshi Mouri 2006-2009.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -197,7 +197,7 @@
197197
198198 reparse_data_header top_head;
199199 top_head.tag = mount_point_tag;
200- top_head.length = full_size - sizeof(top_head);
200+ top_head.length = static_cast<WORD>(full_size - sizeof(top_head));
201201 top_head.reserved = 0;
202202 std::memcpy(buf_ptr, &top_head, sizeof(top_head));
203203 buf_ptr += sizeof(top_head);
@@ -204,9 +204,12 @@
204204
205205 mount_point_header mt_head;
206206 mt_head.sub_name_offset = 0;
207- mt_head.sub_name_length = sub_name_length * sizeof(wchar_t);
208- mt_head.print_name_offset = mt_head.sub_name_length + sizeof(wchar_t);
209- mt_head.print_name_length = print_name_length * sizeof(wchar_t);
207+ mt_head.sub_name_length =
208+ static_cast<WORD>(sub_name_length * sizeof(wchar_t));
209+ mt_head.print_name_offset =
210+ static_cast<WORD>(mt_head.sub_name_length + sizeof(wchar_t));
211+ mt_head.print_name_length =
212+ static_cast<WORD>(print_name_length * sizeof(wchar_t));
210213 std::memcpy(buf_ptr, &mt_head, sizeof(mt_head));
211214 buf_ptr += sizeof(mt_head);
212215
@@ -221,7 +224,7 @@
221224
222225 DWORD dummy = 0;
223226 if (::DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT,
224- buf.get(), full_size, 0, 0, &dummy, 0) == 0)
227+ buf.get(), static_cast<DWORD>(full_size), 0, 0, &dummy, 0) == 0)
225228 {
226229 return last_error();
227230 }
@@ -312,13 +315,14 @@
312315 }
313316
314317 int size = ::WideCharToMultiByte(
315- CP_ACP, 0, &wbuf[0], wbuf.size(), 0, 0, 0, 0);
318+ CP_ACP, 0, &wbuf[0], static_cast<int>(wbuf.size()), 0, 0, 0, 0);
316319 if (size == 0)
317320 return last_error();
318321
319322 boost::scoped_array<char> buf(new char[size]);
320323 size = ::WideCharToMultiByte(
321- CP_ACP, 0, &wbuf[0], wbuf.size(), buf.get(), size, 0, 0);
324+ CP_ACP, 0, &wbuf[0], static_cast<int>(wbuf.size()),
325+ buf.get(), size, 0, 0);
322326 if (size == 0)
323327 return last_error();
324328 target.assign(buf.get(), buf.get()+size);
@@ -328,7 +332,8 @@
328332
329333 inline error_code set_mount_point(HANDLE handle, const std::string& ph)
330334 {
331- int w_size = ::MultiByteToWideChar(CP_ACP, 0, ph.c_str(), ph.size(), 0, 0);
335+ int w_size = ::MultiByteToWideChar(
336+ CP_ACP, 0, ph.c_str(), static_cast<int>(ph.size()), 0, 0);
332337 if (w_size == 0)
333338 return last_error();
334339
@@ -348,8 +353,8 @@
348353 ptr += 3;
349354 }
350355
351- w_size =
352- ::MultiByteToWideChar(CP_ACP, 0, ph.c_str(), ph.size(), ptr, w_size);
356+ w_size = ::MultiByteToWideChar(
357+ CP_ACP, 0, ph.c_str(), static_cast<int>(ph.size()), ptr, w_size);
353358 if (w_size == 0)
354359 return last_error();
355360
Show on old repository browser