From 6b5a8111755251ff552ba8031b5a89dcf0b73542 Mon Sep 17 00:00:00 2001
From: Marcus Meissner <marcus@jet.franken.de>
Date: Sat, 30 Jan 1999 13:06:00 +0000
Subject: [PATCH] Some more warnings and bugs fixed.

---
 dlls/comctl32/comctl32undoc.c |  2 +-
 files/file.c                  |  1 +
 graphics/psdrv/text.c         |  2 +-
 msdos/int2f.c                 |  5 +----
 programs/winhelp/hlp2sgml.c   | 22 +++++++++++-----------
 5 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c
index cd1759937d1..a8292fcff8d 100644
--- a/dlls/comctl32/comctl32undoc.c
+++ b/dlls/comctl32/comctl32undoc.c
@@ -335,7 +335,7 @@ CreateMRUListLazy32A (LPMRUINFO lpmi, DWORD dwParam2, DWORD dwParam3, DWORD dwPa
     if (lpmi) {
 	FIXME (commctrl, "(%lx %lx %lx %lx \"%s\" %lx)\n",
 	       lpmi->dwParam1, lpmi->dwParam2, lpmi->dwParam3,
-	       lpmi->hkeyMain, lpmi->lpszSubKey, lpmi->dwParam6);
+	       (DWORD)lpmi->hkeyMain, lpmi->lpszSubKey, lpmi->dwParam6);
     }
 
     /* dummy pointer creation */
diff --git a/files/file.c b/files/file.c
index 3d5b46969ce..9bef1e535c2 100644
--- a/files/file.c
+++ b/files/file.c
@@ -37,6 +37,7 @@
 #include "process.h"
 #include "task.h"
 #include "async.h"
+#include "wincon.h"
 #include "debug.h"
 
 #include "server/request.h"
diff --git a/graphics/psdrv/text.c b/graphics/psdrv/text.c
index ee4beac94bc..3ce601df3e5 100644
--- a/graphics/psdrv/text.c
+++ b/graphics/psdrv/text.c
@@ -22,7 +22,7 @@ BOOL32 PSDRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
     SIZE32 sz;
 
     TRACE(psdrv, "(x=%d, y=%d, flags=0x%08x, str='%.*s', count=%d)\n", x, y,
-	  flags, count, str, count);
+	  flags, (int)count, str, count);
 
     strbuf = (char *)HeapAlloc( PSDRV_Heap, 0, count + 1);
     if(!strbuf) {
diff --git a/msdos/int2f.c b/msdos/int2f.c
index 6374a2e34e5..13351b88fbb 100644
--- a/msdos/int2f.c
+++ b/msdos/int2f.c
@@ -28,7 +28,7 @@ static void do_int2f_16( CONTEXT *context );
  */
 void WINAPI INT_Int2fHandler( CONTEXT *context )
 {
-    TRACE(int,"Subfunction 0x%X\n", AH_reg(context));
+    TRACE(int,"Subfunction 0x%X\n", AX_reg(context));
 
     switch(AH_reg(context))
     {
@@ -265,9 +265,6 @@ static void do_int2f_16( CONTEXT *context )
 
     case 0x80:  /* Release time-slice */
 	AL_reg(context) = 0;
-	/* FIXME: We need to do something that lets some other process run
-	   here.  */
-	sleep(0);
         break;
 
     case 0x81: /* Begin critical section.  */
diff --git a/programs/winhelp/hlp2sgml.c b/programs/winhelp/hlp2sgml.c
index ba7827a16c3..b90f46f35f9 100644
--- a/programs/winhelp/hlp2sgml.c
+++ b/programs/winhelp/hlp2sgml.c
@@ -252,34 +252,34 @@ int main(int argc, char **argv)
 
 static FILE *file = 0;
 
-HFILE OpenFile32( LPCSTR path, OFSTRUCT *ofs, UINT mode )
+HFILE WINAPI OpenFile32( LPCSTR path, OFSTRUCT *ofs, UINT mode )
 {
   file = *path ? fopen(path, "r") : stdin;
   return file ? 1 : HFILE_ERROR;
 }
 
-HFILE _lclose32( HFILE hFile )
+HFILE WINAPI _lclose32( HFILE hFile )
 {
   fclose(file);
   return 0;
 }
 
-LONG _hread32( HFILE hFile, LPVOID buffer, LONG count )
+LONG WINAPI _hread32( HFILE hFile, LPVOID buffer, LONG count )
 {
   return fread(buffer, 1, count, file);
 }
 
-HGLOBAL GlobalAlloc( UINT flags, DWORD size )
+HGLOBAL WINAPI GlobalAlloc( UINT flags, DWORD size )
 {
   return (HGLOBAL) malloc(size);
 }
 
-LPVOID GlobalLock( HGLOBAL handle )
+LPVOID WINAPI GlobalLock( HGLOBAL handle )
 {
   return (LPVOID) handle;
 }
 
-HGLOBAL GlobalFree( HGLOBAL handle )
+HGLOBAL WINAPI GlobalFree( HGLOBAL handle )
 {
   free((VOID*) handle);
   return(0);
@@ -291,12 +291,12 @@ HGLOBAL GlobalFree( HGLOBAL handle )
  * Copyright 1993 Yngvi Sigurjonsson (yngvi@hafro.is)
  */
 
-INT lstrcmp(LPCSTR str1,LPCSTR str2)
+INT WINAPI lstrcmp(LPCSTR str1,LPCSTR str2)
 {
   return strcmp( str1, str2 );
 }
 
-INT lstrcmpi( LPCSTR str1, LPCSTR str2 )
+INT WINAPI lstrcmpi( LPCSTR str1, LPCSTR str2 )
 {
   INT res;
 
@@ -309,19 +309,19 @@ INT lstrcmpi( LPCSTR str1, LPCSTR str2 )
   return toupper(*str1) - toupper(*str2);
 }
 
-INT lstrlen(LPCSTR str)
+INT WINAPI lstrlen(LPCSTR str)
 {
   return strlen(str);
 }
 
-LPSTR lstrcpy32A( LPSTR dst, LPCSTR src )
+LPSTR WINAPI lstrcpy32A( LPSTR dst, LPCSTR src )
 {
     if (!src || !dst) return NULL;
     strcpy( dst, src );
     return dst;
 }
 
-void hmemcpy(LPVOID hpvDest, LPCVOID hpvSource, LONG cbCopy)
+void WINAPI hmemcpy(LPVOID hpvDest, LPCVOID hpvSource, LONG cbCopy)
 {
   memcpy(hpvDest, hpvSource, cbCopy);
 }
-- 
GitLab