aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2021-02-03 21:00:28 +0100
committerPali Rohár <pali.rohar@gmail.com>2021-02-03 21:00:28 +0100
commitd1a0d28f903f9d3eff03f06e299cde5a7998216e (patch)
treea1864373ffa22f4e0388f7dca56c13f055ef7e0c
parent06fea3fe8b3efe8c79f97fa724f703bc0e25aeef (diff)
downloaddlfcn-win32-d1a0d28f903f9d3eff03f06e299cde5a7998216e.tar.gz
dlfcn-win32-d1a0d28f903f9d3eff03f06e299cde5a7998216e.tar.bz2
dlfcn-win32-d1a0d28f903f9d3eff03f06e299cde5a7998216e.zip
Fix MSVC 14.00 compile warning: warning C4244: '=' : conversion from 'ULONG_PTR' to 'char', possible loss of data
-rw-r--r--src/dlfcn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dlfcn.c b/src/dlfcn.c
index 80bd119..394ee19 100644
--- a/src/dlfcn.c
+++ b/src/dlfcn.c
@@ -192,7 +192,7 @@ static void save_err_ptr_str( const void *ptr, DWORD dwMessageId )
192 192
193 for( i = 0; i < 2 * sizeof( ptr ); i++ ) 193 for( i = 0; i < 2 * sizeof( ptr ); i++ )
194 { 194 {
195 num = ( ( (ULONG_PTR) ptr ) >> ( 8 * sizeof( ptr ) - 4 * ( i + 1 ) ) ) & 0xF; 195 num = (char) ( ( ( (ULONG_PTR) ptr ) >> ( 8 * sizeof( ptr ) - 4 * ( i + 1 ) ) ) & 0xF );
196 ptr_buf[2 + i] = num + ( ( num < 0xA ) ? '0' : ( 'A' - 0xA ) ); 196 ptr_buf[2 + i] = num + ( ( num < 0xA ) ? '0' : ( 'A' - 0xA ) );
197 } 197 }
198 198