]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
_msi.c: Fix compiler warnings on Windows 64-bit
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 23:14:49 +0000 (00:14 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 19 Nov 2013 23:14:49 +0000 (00:14 +0100)
"hf" type is INT_PTR, it is used to store an int in _msi.c.

PC/_msi.c

index eb690140731dddc40219f88c70d470ff2b6f4a29..6a99b40cda8dc0ad3dcd46f3b542135bfcdd5781 100644 (file)
--- a/PC/_msi.c
+++ b/PC/_msi.c
@@ -63,7 +63,7 @@ static FNFCIOPEN(cb_open)
 
 static FNFCIREAD(cb_read)
 {
-    UINT result = (UINT)_read(hf, memory, cb);
+    UINT result = (UINT)_read((int)hf, memory, cb);
     if (result != cb)
         *err = errno;
     return result;
@@ -71,7 +71,7 @@ static FNFCIREAD(cb_read)
 
 static FNFCIWRITE(cb_write)
 {
-    UINT result = (UINT)_write(hf, memory, cb);
+    UINT result = (UINT)_write((int)hf, memory, cb);
     if (result != cb)
         *err = errno;
     return result;
@@ -79,7 +79,7 @@ static FNFCIWRITE(cb_write)
 
 static FNFCICLOSE(cb_close)
 {
-    int result = _close(hf);
+    int result = _close((int)hf);
     if (result != 0)
         *err = errno;
     return result;
@@ -87,7 +87,7 @@ static FNFCICLOSE(cb_close)
 
 static FNFCISEEK(cb_seek)
 {
-    long result = (long)_lseek(hf, dist, seektype);
+    long result = (long)_lseek((int)hf, dist, seektype);
     if (result == -1)
         *err = errno;
     return result;