Re: msvcp90: Fix 64-bit compilation warnings
Piotr Caban <piotr(a)codeweavers.com> writes:
@@ -596,7 +596,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12) basic_string_char* __thiscall MSVCP_basic_string_char_erase( basic_string_char *this, size_t pos, size_t len) { - TRACE("%p %d %d\n", this, pos, len); + TRACE("%p %d %d\n", this, (int)pos, (int)len);
You should be casting to long, otherwise you'll potentially truncate the value. -- Alexandre Julliard julliard(a)winehq.org
On Wed, Sep 1, 2010 at 12:56 PM, Alexandre Julliard <julliard(a)winehq.org> wrote:
Piotr Caban <piotr(a)codeweavers.com> writes:
@@ -596,7 +596,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12) basic_string_char* __thiscall MSVCP_basic_string_char_erase( basic_string_char *this, size_t pos, size_t len) { - TRACE("%p %d %d\n", this, pos, len); + TRACE("%p %d %d\n", this, (int)pos, (int)len);
You should be casting to long, otherwise you'll potentially truncate the value.
%zu is out of the question?
Octavian Voicu <octavian.voicu(a)gmail.com> writes:
You should be casting to long, otherwise you'll potentially truncate the value.
%zu is out of the question?
Yes. Besides, that's the msvcrt size_t, not the real one. -- Alexandre Julliard julliard(a)winehq.org
On Wed, Sep 01, 2010 at 11:56:40AM +0200, Alexandre Julliard wrote:
Piotr Caban <piotr(a)codeweavers.com> writes:
@@ -596,7 +596,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_erase, 12) basic_string_char* __thiscall MSVCP_basic_string_char_erase( basic_string_char *this, size_t pos, size_t len) { - TRACE("%p %d %d\n", this, pos, len); + TRACE("%p %d %d\n", this, (int)pos, (int)len);
You should be casting to long, otherwise you'll potentially truncate the value.
In which case the format specifiers need to be %ld as well... David -- David Laight: david(a)l8s.co.uk
participants (3)
-
Alexandre Julliard -
David Laight -
Octavian Voicu