[MLton-commit] r4605

Stephen Weeks MLton@mlton.org
Thu, 25 May 2006 08:45:44 -0700


Used a temporary to silence the "cast does not match function type"
warning on Cygwin and MinGW.


----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c
U   mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c

----------------------------------------------------------------------

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c	2006-05-25 15:19:00 UTC (rev 4604)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/cygwin.c	2006-05-25 15:45:42 UTC (rev 4605)
@@ -9,7 +9,11 @@
 #include "windows.c"
 
 HANDLE fileDesHandle (int fd) {
-        return (HANDLE)(get_osfhandle (fd));
+  // The temporary prevents a "cast does not match function type" warning.
+  long t;
+
+  t = get_osfhandle (fd);
+  return (HANDLE)t;
 }
 
 void GC_decommit (void *base, size_t length) {

Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c	2006-05-25 15:19:00 UTC (rev 4604)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c	2006-05-25 15:45:42 UTC (rev 4605)
@@ -25,7 +25,11 @@
 }
 
 HANDLE fileDesHandle (int fd) {
-        return (HANDLE)(_get_osfhandle (fd));
+  // The temporary prevents a "cast does not match function type" warning.
+  long t;
+
+  t = _get_osfhandle (fd);
+  return (HANDLE)t;
 }
 
 int getpagesize (void) {