[ros-kernel] some patches to fix some warnnings
Jonathan Wilson
jonwil at tpgi.com.au
Thu Nov 13 11:06:08 CET 2003
-------------- next part --------------
Index: apps/tests/SampleWindow/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/SampleWindow/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/SampleWindow/makefile 24 Jul 2003 15:51:58 -0000 1.1
+++ apps/tests/SampleWindow/makefile 13 Nov 2003 02:23:50 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/alive/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/alive/Makefile,v
retrieving revision 1.6
diff -u -w -r1.6 Makefile
--- apps/tests/alive/Makefile 2 Jun 2002 19:24:57 -0000 1.6
+++ apps/tests/alive/Makefile 13 Nov 2003 02:23:50 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/apc/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/apc/makefile,v
retrieving revision 1.9
diff -u -w -r1.9 makefile
--- apps/tests/apc/makefile 2 Jun 2002 19:24:57 -0000 1.9
+++ apps/tests/apc/makefile 13 Nov 2003 02:23:50 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/apc2/apc2.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/apc2/apc2.c,v
retrieving revision 1.1
diff -u -w -r1.1 apc2.c
--- apps/tests/apc2/apc2.c 3 Nov 2003 00:34:43 -0000 1.1
+++ apps/tests/apc2/apc2.c 13 Nov 2003 02:23:51 -0000
@@ -7,7 +7,7 @@
DWORD dwTimerLowValue,
DWORD dwTimerHighValue )
{
- printf("APC Callback %i\n", *(PDWORD)lpArg);
+ printf("APC Callback %lu\n", *(PDWORD)lpArg);
}
Index: apps/tests/apc2/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/apc2/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/apc2/makefile 3 Nov 2003 00:34:43 -0000 1.1
+++ apps/tests/apc2/makefile 13 Nov 2003 02:23:51 -0000
@@ -12,6 +12,8 @@
TARGET_SDKLIBS = ntdll.a kernel32.a
+TARGET_CFLAGS = -Wall -Werror
+
TARGET_OBJECTS = $(TARGET_NAME).o
include $(PATH_TO_TOP)/rules.mak
Index: apps/tests/args/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/args/makefile,v
retrieving revision 1.15
diff -u -w -r1.15 makefile
--- apps/tests/args/makefile 2 Jun 2002 19:24:57 -0000 1.15
+++ apps/tests/args/makefile 13 Nov 2003 02:23:51 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/atomtest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/atomtest/makefile,v
retrieving revision 1.5
diff -u -w -r1.5 makefile
--- apps/tests/atomtest/makefile 2 Jun 2002 19:24:57 -0000 1.5
+++ apps/tests/atomtest/makefile 13 Nov 2003 02:23:51 -0000
@@ -1,5 +1,4 @@
# $Id: makefile,v 1.5 2002/06/02 19:24:57 chorns Exp $
-
PATH_TO_TOP = ../../..
TARGET_NORC = yes
@@ -14,6 +13,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/bench/bench-thread.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/bench/bench-thread.c,v
retrieving revision 1.6
diff -u -w -r1.6 bench-thread.c
--- apps/tests/bench/bench-thread.c 6 Feb 2001 00:11:17 -0000 1.6
+++ apps/tests/bench/bench-thread.c 13 Nov 2003 02:23:51 -0000
@@ -24,7 +24,6 @@
int main (void)
{
- HANDLE hThread;
DWORD i=0;
DWORD id;
Index: apps/tests/bench/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/bench/makefile,v
retrieving revision 1.10
diff -u -w -r1.10 makefile
--- apps/tests/bench/makefile 2 Jun 2002 19:24:57 -0000 1.10
+++ apps/tests/bench/makefile 13 Nov 2003 02:23:51 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/bitblt/bitblt.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/bitblt/bitblt.c,v
retrieving revision 1.3
diff -u -w -r1.3 bitblt.c
--- apps/tests/bitblt/bitblt.c 20 Sep 2003 14:44:34 -0000 1.3
+++ apps/tests/bitblt/bitblt.c 13 Nov 2003 02:23:51 -0000
@@ -12,6 +12,7 @@
#include <windows.h>
+#include <string.h>
HINSTANCE HInst;
const char* WndClassName = "GMainWnd";
Index: apps/tests/bitblt/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/bitblt/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/bitblt/makefile 26 Apr 2003 21:37:09 -0000 1.2
+++ apps/tests/bitblt/makefile 13 Nov 2003 02:23:51 -0000
@@ -13,6 +13,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/button/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/button/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/button/Makefile 30 Jul 2003 14:08:16 -0000 1.2
+++ apps/tests/button/Makefile 13 Nov 2003 02:23:52 -0000
@@ -13,6 +13,8 @@
TARGET_OBJECTS = buttontst.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/button/buttontst.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/button/buttontst.c,v
retrieving revision 1.3
diff -u -w -r1.3 buttontst.c
--- apps/tests/button/buttontst.c 20 Sep 2003 14:44:34 -0000 1.3
+++ apps/tests/button/buttontst.c 13 Nov 2003 02:23:52 -0000
@@ -15,7 +15,6 @@
LRESULT WmCreate(
HWND Wnd)
{
- UCHAR i;
DPRINT("WM_CREATE (enter).");
DPRINT("test 1");
CreateWindowEx(0, BUTTON_CLASS, "PushButton", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE,
Index: apps/tests/button2/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/button2/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/button2/Makefile 30 Jul 2003 14:08:16 -0000 1.2
+++ apps/tests/button2/Makefile 13 Nov 2003 02:23:52 -0000
@@ -13,6 +13,8 @@
TARGET_OBJECTS = buttontst2.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/button2/buttontst2.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/button2/buttontst2.c,v
retrieving revision 1.2
diff -u -w -r1.2 buttontst2.c
--- apps/tests/button2/buttontst2.c 20 Sep 2003 14:44:34 -0000 1.2
+++ apps/tests/button2/buttontst2.c 13 Nov 2003 02:23:53 -0000
@@ -27,7 +27,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -45,7 +45,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
Index: apps/tests/capclock/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/capclock/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/capclock/Makefile 4 Sep 2003 21:33:11 -0000 1.1
+++ apps/tests/capclock/Makefile 13 Nov 2003 02:23:53 -0000
@@ -11,6 +11,8 @@
TARGET_OBJECTS = capclock.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/capclock/capclock.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/capclock/capclock.c,v
retrieving revision 1.2
diff -u -w -r1.2 capclock.c
--- apps/tests/capclock/capclock.c 24 Sep 2003 20:05:29 -0000 1.2
+++ apps/tests/capclock/capclock.c 13 Nov 2003 02:23:53 -0000
@@ -7,6 +7,7 @@
* LICENSE : GNU GPL v2.0
*/
#include <windows.h>
+#include <string.h>
UINT Timer = 1;
Index: apps/tests/carets/carets.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/carets/carets.c,v
retrieving revision 1.1
diff -u -w -r1.1 carets.c
--- apps/tests/carets/carets.c 15 Oct 2003 18:28:54 -0000 1.1
+++ apps/tests/carets/carets.c 13 Nov 2003 02:23:54 -0000
@@ -34,7 +34,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -52,7 +52,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
Index: apps/tests/carets/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/carets/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/carets/makefile 15 Oct 2003 18:28:54 -0000 1.1
+++ apps/tests/carets/makefile 13 Nov 2003 02:23:54 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/cliarea/cliarea.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/cliarea/cliarea.c,v
retrieving revision 1.1
diff -u -w -r1.1 cliarea.c
--- apps/tests/cliarea/cliarea.c 4 Oct 2003 12:14:37 -0000 1.1
+++ apps/tests/cliarea/cliarea.c 13 Nov 2003 02:23:55 -0000
@@ -1,6 +1,6 @@
#include <windows.h>
#include <stdio.h>
-
+#include <string.h>
//HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
@@ -26,7 +26,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -44,7 +44,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -68,22 +68,19 @@
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- PAINTSTRUCT ps;
HDC hDC;
- RECT clr, wir;
char txt[100];
switch(msg)
{
case WM_LBUTTONUP:
{
- ULONG x, y;
RECT Rect;
GetWindowRect(hWnd, &Rect);
SendMessage(hWnd, WM_NCCALCSIZE, 0, (LPARAM)(&Rect));
hDC = GetWindowDC(0);
Rectangle(hDC, Rect.left, Rect.top, Rect.right, Rect.bottom);
- sprintf(txt, "Client coordinates: %d, %d, %d, %d\0", Rect.left, Rect.top, Rect.right, Rect.bottom);
+ sprintf(txt, "Client coordinates: %lu, %lu, %lu, %lu", Rect.left, Rect.top, Rect.right, Rect.bottom);
TextOut(hDC, Rect.left + 1, Rect.top + 1, (LPCTSTR)txt, strlen(txt));
ReleaseDC(0, hDC);
break;
Index: apps/tests/cliarea/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/cliarea/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/cliarea/makefile 4 Oct 2003 12:14:37 -0000 1.1
+++ apps/tests/cliarea/makefile 13 Nov 2003 02:23:55 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/combo/combotst.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/combo/combotst.c,v
retrieving revision 1.3
diff -u -w -r1.3 combotst.c
--- apps/tests/combo/combotst.c 20 Sep 2003 14:44:34 -0000 1.3
+++ apps/tests/combo/combotst.c 13 Nov 2003 02:23:59 -0000
@@ -73,7 +73,7 @@
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
typedef FunctionHandler* LPFUNCTIONHANDLER;
-PrintTextXY(char* Text,int x,int y,int len, RECT rect)
+void PrintTextXY(char* Text,int x,int y,int len, RECT rect)
{
HDC hdc;
hdc = GetDC (g_hwnd);
@@ -141,61 +141,61 @@
}
Msg[] =
{
- "CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex,
- "CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex,
- "CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex, /* remember to catch WM_DELETEITEM*/
+ {"CB_ADDSTRING",CB_ADDSTRING,0,(LPARAM)&AddString,&HandlePrintReturnHex},
+ {"CB_ADDSTRING - long",CB_ADDSTRING,0,(LPARAM)"very loooooooooong striiinnnnnnnnnggg",&HandlePrintReturnHex},
+ {"CB_DELETESTRING",CB_DELETESTRING,2,0,&HandlePrintReturnHex}, /* remember to catch WM_DELETEITEM*/
/* What a message, why M$ decided to implement his thing ? */
- "CB_DIR - drives",CB_DIR,DDL_DRIVES,
+ {"CB_DIR - drives",CB_DIR,DDL_DRIVES,
/* Hoping that most machines have this */
(LPARAM)"C:\\",
- &HandlePrintReturnHex,
+ &HandlePrintReturnHex},
- "CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex,
+ {"CB_DIR - dirs",CB_DIR,DDL_DIRECTORY,(LPARAM)"C:\\*",&HandlePrintReturnHex},
- "CB_DIR - files",CB_DIR,
+ {"CB_DIR - files",CB_DIR,
DDL_ARCHIVE | DDL_EXCLUSIVE | DDL_HIDDEN | DDL_READONLY | DDL_READWRITE | DDL_SYSTEM,
- (LPARAM)"C:\\*",&HandlePrintReturnHex,
+ (LPARAM)"C:\\*",&HandlePrintReturnHex},
/* Do not forget WM_COMPAREITEM */
- "CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex,
- "CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex,
- "CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex,
+ {"CB_FINDSTRING",CB_FINDSTRING,1,(LPARAM)"str",&HandlePrintReturnHex},
+ {"CB_FINDSTRINGEXACT(-1)",CB_FINDSTRINGEXACT,-1,(LPARAM)&AddString,&HandlePrintReturnHex},
+ {"CB_FINDSTRINGEXACT(2)",CB_FINDSTRINGEXACT,2,(LPARAM)&AddString,&HandlePrintReturnHex},
/* "CB_GETCOMBOBOXINFO",CB_GETCOMBOBOXINFO,0,0,&HandlePrintReturnHex, winXP & .net server remember to handle the struct */
- "CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex,
+ {"CB_GETCOUNT",CB_GETCOUNT,0,0,&HandlePrintReturnHex},
- "CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex,
+ {"CB_GETCURSEL",CB_GETCURSEL,0,0,&HandlePrintReturnHex},
/* To implement "CB_GETEDITSEL - vars",CB_GETEDITSEL,,,&HandlePrintReturnHex, */
- "CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex,
- "CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex,
+ {"CB_GETEXTENDEDUI",CB_GETEXTENDEDUI,0,0,&HandlePrintReturnHex},
+ {"CB_GETHORIZONTALEXTENT",CB_GETHORIZONTALEXTENT,0,0,&HandlePrintReturnHex},
- "CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr,
- "CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex,
- "CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex,
+ {"CB_GETLBTEXT",CB_GETLBTEXT,1,(LPARAM)&TextBuffer[8],&HandlePrintReturnStr},
+ {"CB_GETLBTEXTLEN",CB_GETLBTEXTLEN,1,0,&HandlePrintReturnHex},
+ {"CB_GETLOCALE",CB_GETLOCALE,0,0,&HandlePrintReturnHex},
/* "CB_GETMINVISIBLE",CB_GETMINVISIBLE,0,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server. */
- "CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex,
+ {"CB_GETTOPINDEX",CB_GETTOPINDEX,0,0,&HandlePrintReturnHex},
- "CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex,
- "CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex,
+ {"CB_INITSTORAGE",CB_INITSTORAGE,10,200,&HandlePrintReturnHex},
+ {"CB_INSERTSTRING",CB_INSERTSTRING,2,(LPARAM)"inserted string",&HandlePrintReturnHex},
- "CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex,
- "CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex,
- "CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex,
- "CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex,
+ {"CB_LIMITTEXT",CB_LIMITTEXT,10,0,&HandlePrintReturnHex},
+ {"CB_RESETCONTENT",CB_RESETCONTENT ,0,0,&HandlePrintReturnHex},
+ {"CB_SELECTSTRING",CB_SELECTSTRING,2,(LPARAM)"str",&HandlePrintReturnHex},
+ {"CB_SETCURSEL",CB_SETCURSEL,1,0,&HandlePrintReturnHex},
- "CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex,
+ {"CB_SETDROPPEDWIDTH",CB_SETDROPPEDWIDTH,250,0,&HandlePrintReturnHex},
- "CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex,
- "CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex,
+ {"CB_SETEXTENDEDUI - set",CB_SETEXTENDEDUI,TRUE,0,&HandlePrintReturnHex},
+ {"CB_SETEXTENDEDUI - clear",CB_SETEXTENDEDUI,FALSE,0,&HandlePrintReturnHex},
/*
* win2k have a small bug with this ^ , if you press F4 while it is cleared,
@@ -204,30 +204,30 @@
* to an arrow
*/
- "CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex,
+ {"CB_SETHORIZONTALEXTENT",CB_SETHORIZONTALEXTENT,500,0,&HandlePrintReturnHex},
- "CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex,
- "CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex,
+ {"CB_GETITEMDATA",CB_GETITEMDATA,1,0,&HandlePrintReturnHex},
+ {"CB_SETITEMDATA",CB_SETITEMDATA,1,0x791031,&HandlePrintReturnHex},
- "CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex,
- "CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex,
+ {"CB_SETITEMHEIGHT",CB_SETITEMHEIGHT,-1,30,&HandlePrintReturnHex},
+ {"CB_GETITEMHEIGHT",CB_GETITEMHEIGHT,2,0,&HandlePrintReturnHex},
/* "CB_SETMINVISIBLE",CB_SETMINVISIBLE,4,0,&HandlePrintReturnHex, Included in Windows XP and Windows .NET Server */
- "CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex,
- "CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex,
- "CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex,
+ {"CB_GETEDITSEL",CB_GETEDITSEL,(WPARAM)NULL,(LPARAM)NULL,&HandlePrintReturnHex},
+ {"CB_SETEDITSEL",CB_SETEDITSEL,0,0x00020005,&HandlePrintReturnHex},
+ {"CB_SETEDITSEL - clear",CB_SETEDITSEL,0,0xFFFFFFFF,&HandlePrintReturnHex},
- "CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex,
+ {"CB_SETTOPINDEX",CB_SETTOPINDEX,3,0,&HandlePrintReturnHex},
- "CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex,
- "CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex,
+ {"CB_SHOWDROPDOWN - true",CB_SHOWDROPDOWN,TRUE,0,&HandlePrintReturnHex},
+ {"CB_SHOWDROPDOWN - false",CB_SHOWDROPDOWN,FALSE,0,&HandlePrintReturnHex},
- "CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect,
- "CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex,
- "CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex,
+ {"CB_GETDROPPEDCONTROLRECT",CB_GETDROPPEDCONTROLRECT,0,(LPARAM)&rect,&HandlePrintRect},
+ {"CB_GETDROPPEDSTATE",CB_GETDROPPEDSTATE,0,0,&HandlePrintReturnHex},
+ {"CB_GETDROPPEDWIDTH",CB_GETDROPPEDWIDTH,0,0,&HandlePrintReturnHex},
- "WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex,
+ {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
};
#define MAXMESSAGEBUTTONS 40
@@ -238,23 +238,23 @@
DWORD Code; /* Style Code */
}
Styles[] = {
- "WS_DISABLED",WS_DISABLED,
- "CBS_AUTOHSCROLL",CBS_AUTOHSCROLL,
- "CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL,
- "CBS_DROPDOWN",CBS_DROPDOWN,
- "CBS_DROPDOWNLIST",CBS_DROPDOWNLIST,
- "CBS_HASSTRINGS",CBS_HASSTRINGS,
- "CBS_LOWERCASE",CBS_LOWERCASE,
- "CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT,
- "CBS_OEMCONVERT",CBS_OEMCONVERT,
- "CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED,
- "CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE,
- "CBS_SIMPLE",CBS_SIMPLE,
- "CBS_SORT",CBS_SORT,
- "CBS_UPPERCASE",CBS_UPPERCASE,
- "CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL,
- "WS_HSCROLL",WS_HSCROLL,
- "WS_VSCROLL",WS_VSCROLL
+ {"WS_DISABLED",WS_DISABLED},
+ {"CBS_AUTOHSCROLL",CBS_AUTOHSCROLL},
+ {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
+ {"CBS_DROPDOWN",CBS_DROPDOWN},
+ {"CBS_DROPDOWNLIST",CBS_DROPDOWNLIST},
+ {"CBS_HASSTRINGS",CBS_HASSTRINGS},
+ {"CBS_LOWERCASE",CBS_LOWERCASE},
+ {"CBS_NOINTEGRALHEIGHT",CBS_NOINTEGRALHEIGHT},
+ {"CBS_OEMCONVERT",CBS_OEMCONVERT},
+ {"CBS_OWNERDRAWFIXED",CBS_OWNERDRAWFIXED},
+ {"CBS_OWNERDRAWVARIABLE",CBS_OWNERDRAWVARIABLE},
+ {"CBS_SIMPLE",CBS_SIMPLE},
+ {"CBS_SORT",CBS_SORT},
+ {"CBS_UPPERCASE",CBS_UPPERCASE},
+ {"CBS_DISABLENOSCROLL",CBS_DISABLENOSCROLL},
+ {"WS_HSCROLL",WS_HSCROLL},
+ {"WS_VSCROLL",WS_VSCROLL}
};
/* The number of check buttons we have.
Index: apps/tests/combo/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/combo/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/combo/makefile 17 Jul 2003 03:05:44 -0000 1.1
+++ apps/tests/combo/makefile 13 Nov 2003 02:23:59 -0000
@@ -15,6 +15,9 @@
combotst.o \
utils.o
+TARGET_CFLAGS = -Wall -Werror
+
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/consume/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/consume/Makefile,v
retrieving revision 1.7
diff -u -w -r1.7 Makefile
--- apps/tests/consume/Makefile 2 Jun 2002 19:24:57 -0000 1.7
+++ apps/tests/consume/Makefile 13 Nov 2003 02:23:59 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/copymove/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/copymove/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/copymove/Makefile 27 Dec 2002 23:54:33 -0000 1.1
+++ apps/tests/copymove/Makefile 13 Nov 2003 02:24:00 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/copymove/copymove.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/copymove/copymove.c,v
retrieving revision 1.1
diff -u -w -r1.1 copymove.c
--- apps/tests/copymove/copymove.c 27 Dec 2002 23:54:33 -0000 1.1
+++ apps/tests/copymove/copymove.c 13 Nov 2003 02:24:01 -0000
@@ -4,6 +4,7 @@
#include <ctype.h>
#include <stdio.h>
+#include <stdlib.h>
#include <tchar.h>
#include <windows.h>
@@ -54,20 +55,20 @@
0);
if (INVALID_HANDLE_VALUE == file) {
- fprintf(stderr, "CreateFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
exit(1);
}
for(c = 0; c < sizeof(buffer); c++) {
buffer[c] = (char) c;
}
if (! WriteFile(file, buffer, sizeof(buffer), &wrote, NULL)) {
- fprintf(stderr, "WriteFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "WriteFile failed with code %lu\n", GetLastError());
exit(1);
}
CloseHandle(file);
if (! SetFileAttributes(filename, attributes)) {
- fprintf(stderr, "SetFileAttributes failed with code %d\n", GetLastError());
+ fprintf(stderr, "SetFileAttributes failed with code %lu\n", GetLastError());
exit(1);
}
}
@@ -82,7 +83,7 @@
CreateTestDir(LPCTSTR dirname)
{
if (! CreateDirectory(dirname, NULL)) {
- fprintf(stderr, "CreateDirectory failed with code %d\n", GetLastError());
+ fprintf(stderr, "CreateDirectory failed with code %lu\n", GetLastError());
exit(1);
}
}
@@ -105,21 +106,21 @@
0);
if (INVALID_HANDLE_VALUE == file) {
- fprintf(stderr, "CreateFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "CreateFile failed with code %lu\n", GetLastError());
exit(1);
}
if (! ReadFile(file, buffer, sizeof(buffer), &read, NULL)) {
- fprintf(stderr, "ReadFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "ReadFile failed with code %lu\n", GetLastError());
exit(1);
}
if (read != sizeof(buffer)) {
- fprintf(stderr, "Trying to read %d bytes but got %d bytes\n", sizeof(buffer), read);
+ fprintf(stderr, "Trying to read %u bytes but got %lu bytes\n", sizeof(buffer), read);
exit(1);
}
for(c = 0; c < sizeof(buffer); c++) {
if (buffer[c] != (char) c) {
- fprintf(stderr, "File contents changed at position %d\n", c);
+ fprintf(stderr, "File contents changed at position %u\n", c);
exit(1);
}
}
@@ -128,11 +129,11 @@
diskattr = GetFileAttributes(filename);
if (INVALID_FILE_ATTRIBUTES == diskattr) {
- fprintf(stderr, "GetFileAttributes failed with code %d\n", GetLastError());
+ fprintf(stderr, "GetFileAttributes failed with code %lu\n", GetLastError());
exit(1);
}
if (diskattr != attributes) {
- fprintf(stderr, "Attribute mismatch, expected 0x%08x found 0x%08x\n", attributes, diskattr);
+ fprintf(stderr, "Attribute mismatch, expected 0x%08lx found 0x%08lx\n", attributes, diskattr);
exit(1);
}
}
@@ -149,7 +150,7 @@
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(_T("end.dat"));
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
- fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
@@ -162,7 +163,7 @@
fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
exit(1);
} else if (ERROR_FILE_NOT_FOUND != GetLastError()) {
- fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(_T("end.dat"));
@@ -176,7 +177,7 @@
fprintf(stderr, "MoveFile succeeded but shouldn't have\n");
exit(1);
} else if (ERROR_ALREADY_EXISTS != GetLastError()) {
- fprintf(stderr, "MoveFile failed with unexpected code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with unexpected code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
@@ -190,7 +191,7 @@
CreateTestFile(_T("begin\\file.dat"), FILE_ATTRIBUTE_NORMAL);
DeleteTestDir(_T("end"));
if (! MoveFile(_T("begin"), _T("end"))) {
- fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_NORMAL);
@@ -202,7 +203,7 @@
CreateTestFile(_T("file.dat"), FILE_ATTRIBUTE_NORMAL);
CreateTestDir(_T("end"));
if (! MoveFile(_T("file.dat"), _T("end\\file.dat"))) {
- fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(_T("end\\file.dat"), FILE_ATTRIBUTE_ARCHIVE);
@@ -213,7 +214,7 @@
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_READONLY);
DeleteTestFile(_T("end.dat"));
if (! MoveFile(_T("begin.dat"), _T("end.dat"))) {
- fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_READONLY);
@@ -225,7 +226,7 @@
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
if (! MoveFile(_T("begin.dat"), otherfile)) {
- fprintf(stderr, "MoveFile failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFile failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
@@ -238,7 +239,7 @@
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
CreateTestFile(_T("end.dat"), FILE_ATTRIBUTE_ARCHIVE);
if (! MoveFileEx(_T("begin.dat"), _T("end.dat"), MOVEFILE_REPLACE_EXISTING)) {
- fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
@@ -254,7 +255,7 @@
exit(1);
} else if (ERROR_ALREADY_EXISTS != GetLastError() &&
ERROR_ACCESS_DENIED != GetLastError()) {
- fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError());
+ fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(_T("begin.dat"));
@@ -272,7 +273,7 @@
fprintf(stderr, "MoveFileEx succeeded but shouldn't have\n");
exit(1);
} else if (ERROR_NOT_SAME_DEVICE != GetLastError()) {
- fprintf(stderr, "MoveFileEx failed with unexpected code %d\n", GetLastError());
+ fprintf(stderr, "MoveFileEx failed with unexpected code %lu\n", GetLastError());
exit(1);
}
DeleteTestFile(otherfile);
@@ -287,7 +288,7 @@
CreateTestFile(_T("begin.dat"), FILE_ATTRIBUTE_ARCHIVE);
DeleteTestFile(otherfile);
if (! MoveFileEx(_T("begin.dat"), otherfile, MOVEFILE_COPY_ALLOWED)) {
- fprintf(stderr, "MoveFileEx failed with code %d\n", GetLastError());
+ fprintf(stderr, "MoveFileEx failed with code %lu\n", GetLastError());
exit(1);
}
CheckTestFile(otherfile, FILE_ATTRIBUTE_ARCHIVE);
Index: apps/tests/count/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/count/Makefile,v
retrieving revision 1.6
diff -u -w -r1.6 Makefile
--- apps/tests/count/Makefile 2 Jun 2002 19:24:58 -0000 1.6
+++ apps/tests/count/Makefile 13 Nov 2003 02:24:01 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/count/count.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/count/count.c,v
retrieving revision 1.1
diff -u -w -r1.1 count.c
--- apps/tests/count/count.c 26 Mar 2001 21:30:20 -0000 1.1
+++ apps/tests/count/count.c 13 Nov 2003 02:24:01 -0000
@@ -1,7 +1,7 @@
/* $Id: count.c,v 1.1 2001/03/26 21:30:20 ea Exp $
*
*/
-#include <stdlib.h>
+#include <stdio.h>
int n = 0;
Index: apps/tests/dibtest/dibtest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/dibtest/dibtest.c,v
retrieving revision 1.5
diff -u -w -r1.5 dibtest.c
--- apps/tests/dibtest/dibtest.c 20 Sep 2003 14:44:34 -0000 1.5
+++ apps/tests/dibtest/dibtest.c 13 Nov 2003 02:24:03 -0000
@@ -48,7 +48,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -66,7 +66,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
Index: apps/tests/dibtest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/dibtest/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/dibtest/makefile 4 Mar 2003 10:09:00 -0000 1.2
+++ apps/tests/dibtest/makefile 13 Nov 2003 02:24:03 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/dump_shared_data/dump_shared_data.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/dump_shared_data/dump_shared_data.c,v
retrieving revision 1.5
diff -u -w -r1.5 dump_shared_data.c
--- apps/tests/dump_shared_data/dump_shared_data.c 8 Sep 2002 10:21:57 -0000 1.5
+++ apps/tests/dump_shared_data/dump_shared_data.c 13 Nov 2003 02:24:03 -0000
@@ -5,7 +5,7 @@
{
int i;
- printf("TickCountLow: %x\n",
+ printf("TickCountLow: %lx\n",
SharedUserData->TickCountLow);
printf("Drives: ");
for (i = 0; i < 26; i++)
@@ -48,4 +48,5 @@
}
}
printf("\n\n");
+ return 0;
}
Index: apps/tests/dump_shared_data/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/dump_shared_data/makefile,v
retrieving revision 1.6
diff -u -w -r1.6 makefile
--- apps/tests/dump_shared_data/makefile 2 Jun 2002 19:24:58 -0000 1.6
+++ apps/tests/dump_shared_data/makefile 13 Nov 2003 02:24:03 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/edit/edittest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/edit/edittest.c,v
retrieving revision 1.2
diff -u -w -r1.2 edittest.c
--- apps/tests/edit/edittest.c 20 Sep 2003 14:44:34 -0000 1.2
+++ apps/tests/edit/edittest.c 13 Nov 2003 02:24:07 -0000
@@ -62,6 +62,7 @@
typedef void FunctionHandler(HWND,DWORD,WPARAM,LPARAM);
typedef FunctionHandler* LPFUNCTIONHANDLER;
+VOID
PrintTextXY(char* Text,int x,int y,int len)
{
HDC hdc;
@@ -185,60 +186,60 @@
}
Msg[] =
{
- "EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex,
- "EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex,
- "EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex,
- "EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex,
- "EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex,
-
- "EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex,
- "EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr,
- "EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex,
- "EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex,
- "EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex,
-
- "EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex,
- "EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex,
-
- "EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex,
-
- "EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex,
-
- "EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex,
- "EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex,
- "EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex,
- "EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex,
- "EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex,
-
- "EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex,
- "EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex,
-
- "EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex,
- "EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex,
- "EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex,
-
- "EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex,
- "EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex,
- "EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar,
- "EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex,
- "EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex,
-
- "EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex,
- "EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex,
-
- "EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect,
- "EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex,
- "EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex,
- "EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex,
-
- "EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex,
- "EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex,
- "EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex,
- "WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex,
- "WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex,
+ {"EM_CANUNDO",EM_CANUNDO,0,0,&HandlePrintReturnHex},
+ {"EM_CHARFROMPOS",EM_CHARFROMPOS,(WPARAM)&point,0,&HandlePrintReturnHex},
+ {"EM_EMPTYUNDOBUFFER",EM_EMPTYUNDOBUFFER,0,0,&HandlePrintReturnHex},
+ {"EM_FMTLINES",EM_FMTLINES,TRUE,0,&HandlePrintReturnHex},
+ {"EM_GETFIRSTVISIBLELINE",EM_GETFIRSTVISIBLELINE,0,0,&HandlePrintReturnHex},
+
+ {"EM_GETLIMITTEXT",EM_GETLIMITTEXT,0,0,&HandlePrintReturnHex},
+ {"EM_GETLINE",EM_GETLINE,2,(WPARAM)&TextBuffer[8],&HandlePrintReturnStr},
+ {"EM_GETLINECOUNT",EM_GETLINECOUNT,0,0,&HandlePrintReturnHex},
+ {"EM_GETMARGINS",EM_GETMARGINS,0,0,&HandlePrintReturnHex},
+ {"EM_SETMARGINS",EM_SETMARGINS,EC_LEFTMARGIN,10,&HandlePrintReturnHex},
+
+ {"EM_GETMODIFY",EM_GETMODIFY,0,0,&HandlePrintReturnHex},
+ {"EM_SETMODIFY",EM_SETMODIFY,TRUE,0,&HandlePrintReturnHex},
+
+ {"EM_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex},
+
+ {"EM_GETTHUMB",EM_GETTHUMB,0,0,&HandlePrintReturnHex},
+
+ {"EM_LIMITTEXT",EM_LIMITTEXT,10,0,&HandlePrintReturnHex},
+ {"EM_LINEFROMCHAR",EM_LINEFROMCHAR,-1,0,&HandlePrintReturnHex},
+ {"EM_POSFROMCHAR",EM_POSFROMCHAR,10,0,&HandlePrintReturnHex},
+ {"EM_LINEINDEX",EM_LINEINDEX,2,0,&HandlePrintReturnHex},
+ {"EM_LINELENGTH",EM_LINELENGTH,-1,0,&HandlePrintReturnHex},
+
+ {"EM_GETWORDBREAKPROC",EM_GETWORDBREAKPROC,0,0,&HandlePrintReturnHex},
+ {"EM_REPLACESEL",EM_REPLACESEL,TRUE,(LPARAM)&ReplaceTextStr,&HandlePrintReturnHex},
+
+ {"EM_LINESCROLL",EM_LINESCROLL,5,1,&HandlePrintReturnHex},
+ {"EM_SCROLL",EM_SCROLL,SB_LINEDOWN,0,&HandlePrintReturnHex},
+ {"EM_SCROLLCARET",EM_SCROLLCARET,0,0,&HandlePrintReturnHex},
+
+ {"EM_SETHANDLE",EM_SETHANDLE,0,0,&HandleSetHandlePrintHex},
+ {"EM_GETHANDLE",EM_GETHANDLE,0,0,&HandlePrintReturnHex},
+ {"EM_GETPASSWORDCHAR",EM_GETPASSWORDCHAR,0,0,&HandlePrintPasswdChar},
+ {"EM_SETPASSWORDCHAR - clear",EM_SETPASSWORDCHAR,0,0,&HandlePrintReturnHex},
+ {"EM_SETPASSWORDCHAR - x",EM_SETPASSWORDCHAR,'x',0,&HandlePrintReturnHex},
+
+ {"EM_SETREADONLY - set",EM_SETREADONLY,TRUE,0,&HandlePrintReturnHex},
+ {"EM_SETREADONLY - clear",EM_SETREADONLY,FALSE,0,&HandlePrintReturnHex},
+
+ {"EM_GETRECT",EM_GETRECT,0,(LPARAM)&rect2,&HandlePrintRect},
+ {"EM_SETRECT",EM_SETRECT,0,(LPARAM)&rect,&HandlePrintReturnHex},
+ {"EM_SETRECTNP",EM_SETRECTNP,0,(LPARAM)&rect,&HandlePrintReturnHex},
+ {"EM_SETSEL",EM_SETSEL,1,3,&HandlePrintReturnHex},
+
+ {"EM_SETSEL - all",EM_SETSEL,0,-1,&HandlePrintReturnHex},
+ {"EM_SETSEL - remove",EM_SETSEL,-1,0,&HandlePrintReturnHex},
+ {"EM_UNDO",EM_UNDO,0,0,&HandlePrintReturnHex},
+ {"WM_UNDO",WM_UNDO,0,0,&HandlePrintReturnHex},
+ {"WM_PASTE",WM_PASTE,0,0,&HandlePrintReturnHex},
- "WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex,
- "WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex
+ {"WM_CUT",WM_CUT,0,0,&HandlePrintReturnHex},
+ {"WM_COPY",WM_COPY,0,0,&HandlePrintReturnHex}
};
@@ -574,7 +575,6 @@
}
return DefWindowProc ( hwnd, msg, wParam, lParam );
}
-
HWND
RegisterAndCreateWindow (HINSTANCE hInst,
Index: apps/tests/edit/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/edit/makefile,v
retrieving revision 1.3
diff -u -w -r1.3 makefile
--- apps/tests/edit/makefile 10 Jul 2003 05:37:17 -0000 1.3
+++ apps/tests/edit/makefile 13 Nov 2003 02:24:07 -0000
@@ -15,6 +15,8 @@
edittest.o \
utils.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/enumwnd/enumwnd.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/enumwnd/enumwnd.c,v
retrieving revision 1.3
diff -u -w -r1.3 enumwnd.c
--- apps/tests/enumwnd/enumwnd.c 20 Sep 2003 14:44:34 -0000 1.3
+++ apps/tests/enumwnd/enumwnd.c 13 Nov 2003 02:24:08 -0000
@@ -39,7 +39,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- _ftprintf ( stderr, _T("RegisterClass failed (last error 0x%X)\n"),
+ _ftprintf ( stderr, _T("RegisterClass failed (last error 0x%lX)\n"),
GetLastError());
return(1);
}
@@ -57,7 +57,7 @@
NULL);
if (hWnd == NULL)
{
- _ftprintf ( stderr, _T("CreateWindow failed (last error 0x%X)\n"),
+ _ftprintf ( stderr, _T("CreateWindow failed (last error 0x%lX)\n"),
GetLastError());
return(1);
}
Index: apps/tests/enumwnd/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/enumwnd/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/enumwnd/makefile 25 Jul 2003 19:13:14 -0000 1.1
+++ apps/tests/enumwnd/makefile 13 Nov 2003 02:24:08 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/event/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/event/makefile,v
retrieving revision 1.7
diff -u -w -r1.7 makefile
--- apps/tests/event/makefile 2 Jun 2002 19:24:58 -0000 1.7
+++ apps/tests/event/makefile 13 Nov 2003 02:24:08 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/eventpair/eventpair.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/eventpair/eventpair.c,v
retrieving revision 1.1
diff -u -w -r1.1 eventpair.c
--- apps/tests/eventpair/eventpair.c 10 Sep 2003 06:12:21 -0000 1.1
+++ apps/tests/eventpair/eventpair.c 13 Nov 2003 02:24:09 -0000
@@ -20,18 +20,18 @@
InitializeObjectAttributes(&Attributes, NULL, 0, NULL, NULL);
Status = NtCreateEventPair(&EventPair, STANDARD_RIGHTS_ALL, &Attributes);
- printf("Status %08x creating eventpair\n", Status);
+ printf("Status %08lx creating eventpair\n", Status);
return EventPair;
}
DWORD __stdcall threadfunc(void* eventpair)
{
- printf("Thread: Set eventpair status %08x\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE)));
+ printf("Thread: Set eventpair status %08lx\n", NtSetInformationThread(NtCurrentThread(), ThreadEventPair, &eventpair, sizeof(HANDLE)));
Sleep(2500);
printf("Thread: Setting low and waiting high...\n");
- printf("Thread: status = %08x\n", NtSetLowWaitHighThread());
- printf("Thread: status = %08x\n", NtSetHighWaitLowThread());
+ printf("Thread: status = %08lx\n", NtSetLowWaitHighThread());
+ printf("Thread: status = %08lx\n", NtSetHighWaitLowThread());
printf("Thread: Terminating...\n");
return 0;
}
@@ -41,7 +41,7 @@
DWORD id;
HANDLE EventPair, Thread;
- printf("Main: NtSetLowWaitHighThread is at %08x\n", NtSetLowWaitHighThread);
+ printf("Main: NtSetLowWaitHighThread is at %08lx\n", NtSetLowWaitHighThread());
EventPair = MakeEventPair();
@@ -50,13 +50,13 @@
return 0;
}
- printf("Main: EventPair = %08x\n", EventPair);
+ printf("Main: EventPair = %08lx\n", (DWORD)EventPair);
Thread = CreateThread(0, 0, threadfunc, EventPair, 0, &id);
- printf("Main: ThreadId for new thread is %08x\n", id);
+ printf("Main: ThreadId for new thread is %08lx\n", id);
printf("Main: Setting high and waiting low\n");
- printf("Main: status = %08x\n", NtSetHighWaitLowEventPair(EventPair));
+ printf("Main: status = %08lx\n", NtSetHighWaitLowEventPair(EventPair));
Sleep(2500);
- printf("Main: status = %08x\n", NtSetLowWaitHighEventPair(EventPair));
+ printf("Main: status = %08lx\n", NtSetLowWaitHighEventPair(EventPair));
NtClose(EventPair);
/* WaitForSingleObject(Thread, INFINITE); FIXME: Waiting on thread handle causes double spinlock acquisition (and subsequent crash) in PsUnblockThread - ntoskrnl/ps/thread.c */
NtClose(Thread);
Index: apps/tests/eventpair/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/eventpair/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/eventpair/makefile 10 Sep 2003 06:12:21 -0000 1.1
+++ apps/tests/eventpair/makefile 13 Nov 2003 02:24:09 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/file/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/file/Makefile,v
retrieving revision 1.8
diff -u -w -r1.8 Makefile
--- apps/tests/file/Makefile 2 Jun 2002 19:24:58 -0000 1.8
+++ apps/tests/file/Makefile 13 Nov 2003 02:24:09 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/file/file.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/file/file.c,v
retrieving revision 1.3
diff -u -w -r1.3 file.c
--- apps/tests/file/file.c 17 Jun 2000 22:04:49 -0000 1.3
+++ apps/tests/file/file.c 13 Nov 2003 02:24:10 -0000
@@ -23,7 +23,7 @@
if (file == INVALID_HANDLE_VALUE)
{
- printf("Error opening file (Status %x)\n", GetLastError());
+ printf("Error opening file (Status %lx)\n", GetLastError());
return 1;
}
for( c = 0; c < sizeof( buffer ); c++ )
@@ -31,14 +31,14 @@
printf("Writing file\n");
if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{
- printf("Error writing file (Status %x)\n", GetLastError());
+ printf("Error writing file (Status %lx)\n", GetLastError());
exit(2);
}
printf("Reading file\n");
SetFilePointer( file, 0, 0, FILE_BEGIN );
if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE)
{
- printf("Error reading file (Status %x)\n", GetLastError());
+ printf("Error reading file (Status %lx)\n", GetLastError());
exit(3);
}
for( c = 0; c < sizeof( buffer ); c++ )
Index: apps/tests/gditest/gditest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/gditest/gditest.c,v
retrieving revision 1.21
diff -u -w -r1.21 gditest.c
--- apps/tests/gditest/gditest.c 1 Oct 2002 06:41:56 -0000 1.21
+++ apps/tests/gditest/gditest.c 13 Nov 2003 02:24:11 -0000
@@ -4,6 +4,9 @@
*/
#include <windows.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
extern BOOL STDCALL GdiDllInitialize(HANDLE hInstance, DWORD Event, LPVOID Reserved);
@@ -159,13 +162,13 @@
printf("GetRegionData( hRgn, size, rgnData ) returned 0\n");
return;
}
- printf("Bounds: left=%d top=%d right=%d bottom=%d, count: %d, type: %i\n\n",
+ printf("Bounds: left=%lu top=%lu right=%lu bottom=%lu, count: %lu, type: %lu\n\n",
rgnData->rdh.rcBound.left, rgnData->rdh.rcBound.top, rgnData->rdh.rcBound.right, rgnData->rdh.rcBound.bottom,
rgnData->rdh.nCount, rgnData->rdh.iType);
printf("Rects:\t i \t left \t top \t right \t bottom\n");
for ( i = 0; i < rgnData->rdh.nCount; i++ ) {
PRECT pr = (PRECT) rgnData->Buffer + i;
- printf("\t %d \t %d \t %d \t %d \t %d\n", i, pr->left, pr->top, pr->right, pr->bottom );
+ printf("\t %d \t %lu \t %lu \t %lu \t %lu\n", i, pr->left, pr->top, pr->right, pr->bottom );
}
printf("\n");
}
@@ -186,7 +189,7 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("GetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("GetRgnBox( hRgn1, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn1 );
@@ -201,7 +204,7 @@
printf("Failed GetRgnBox( hRgn2, &Rect )\n");
return;
}
- printf("GetRgnBox( hRgn2, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("GetRgnBox( hRgn2, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn2 );
@@ -224,7 +227,7 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("After offset\nGetRgnBox( hRgn1, &Rect ): i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After offset\nGetRgnBox( hRgn1, &Rect ): i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
if( EqualRgn( hRgn1, hRgn2 ) == TRUE ){
@@ -244,13 +247,13 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("after SetRectRgn(hRgn1, 10, 11, 110, 111 ):\n i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("after SetRectRgn(hRgn1, 10, 11, 110, 111 ):\n i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
hRgn3 = CreateRectRgn( 1, 1, 1, 1);
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND );
if( i==ERROR ){
- printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ). LastError: %d\n", GetLastError);
+ printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ). LastError: %lu\n", GetLastError());
return;
}
@@ -258,13 +261,13 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_AND ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR );
if( i==ERROR ){
- printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ). LastError: %d\n", GetLastError);
+ printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ). LastError: %lu\n", GetLastError());
return;
}
@@ -272,13 +275,13 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_OR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF );
if( i==ERROR ){
- printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ). LastError: %d\n", GetLastError);
+ printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ). LastError: %lu\n", GetLastError());
return;
}
@@ -286,13 +289,13 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_DIFF ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 );
i = CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR );
if( i==ERROR ){
- printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ). LastError: %d\n", GetLastError);
+ printf("Fail: CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ). LastError: %lu\n", GetLastError());
return;
}
@@ -300,13 +303,13 @@
printf("Failed GetRgnBox( hRgn3, &Rect )\n");
return;
}
- printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After CombineRgn( hRgn3, hRgn1, hRgn2, RGN_XOR ): \nGetRgnBox( hRgn3, &Rect ): CR_i=%d, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn3 );
i = CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY );
if( i==ERROR ){
- printf("Fail: CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ). LastError: %d\n", GetLastError);
+ printf("Fail: CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ). LastError: %lu\n", GetLastError());
return;
}
@@ -314,7 +317,7 @@
printf("Failed GetRgnBox( hRgn1, &Rect )\n");
return;
}
- printf("After CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ): \nGetRgnBox( hRgn1, &Rect ): CR_i=%d, left=%d top=%d right=%d bottom=%d\n\n",
+ printf("After CombineRgn( hRgn1, hRgn3, hRgn2, RGN_COPY ): \nGetRgnBox( hRgn1, &Rect ): CR_i=%u, left=%lu top=%lu right=%lu bottom=%lu\n\n",
i, Rect.left, Rect.top, Rect.right, Rect.bottom );
DumpRgnData( hRgn1 );
Index: apps/tests/gditest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/gditest/makefile,v
retrieving revision 1.8
diff -u -w -r1.8 makefile
--- apps/tests/gditest/makefile 2 Jun 2002 19:24:58 -0000 1.8
+++ apps/tests/gditest/makefile 13 Nov 2003 02:24:11 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/global_mem/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/global_mem/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/global_mem/Makefile 13 Oct 2003 15:05:59 -0000 1.1
+++ apps/tests/global_mem/Makefile 13 Nov 2003 02:24:11 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/global_mem/global_mem.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/global_mem/global_mem.c,v
retrieving revision 1.2
diff -u -w -r1.2 global_mem.c
--- apps/tests/global_mem/global_mem.c 17 Oct 2003 14:18:18 -0000 1.2
+++ apps/tests/global_mem/global_mem.c 13 Nov 2003 02:24:16 -0000
@@ -7,6 +7,7 @@
*/
#include <windows.h>
#include <stdio.h>
+#include <string.h>
/*
** All output is line wrapped to fit a 80 column screen.
@@ -141,7 +142,7 @@
void OUTPUT_HexDword(DWORD dw)
{
char buffer[32];
- sprintf(buffer, "0x%X",dw);
+ sprintf(buffer, "0x%lX",dw);
OUTPUT_Line(buffer);
}
@@ -172,7 +173,7 @@
{
char buffer[256];
- sprintf(buffer,"GetLastError() returned %d", GetLastError());
+ sprintf(buffer,"GetLastError() returned %lu", GetLastError());
OUTPUT_Line(buffer);
}
@@ -260,7 +261,6 @@
{
HGLOBAL hMem = 0;
LPVOID pMem = 0;
- LONG errorCode = 0;
TEST_STATUS subtest = SKIPPED;
TEST_STATUS result = FAILED;
@@ -627,7 +627,7 @@
OUTPUT_Line("Testing for a lock of 0");
uFlags = GlobalFlags(hMem);
- if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/
+ if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
{
result = TEST_CombineStatus(result, PASSED);
}
@@ -643,7 +643,7 @@
OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for a lock of 1");
uFlags = GlobalFlags(hMem);
- if ((GMEM_LOCKCOUNT & uFlags == 1)) /*no locks*/
+ if (((GMEM_LOCKCOUNT & uFlags) == 1)) /*no locks*/
{
result = TEST_CombineStatus(result, PASSED);
}
@@ -657,7 +657,7 @@
OUTPUT_Line("Testing after an unlock");
OUTPUT_Line("Testing for a lock of 0");
uFlags = GlobalFlags(hMem);
- if ((GMEM_LOCKCOUNT & uFlags == 0)) /*no locks*/
+ if (((GMEM_LOCKCOUNT & uFlags) == 0)) /*no locks*/
{
result = TEST_CombineStatus(result, PASSED);
}
@@ -725,7 +725,7 @@
OUTPUT_Line("Testing initial allocation");
OUTPUT_Line("Testing for non-discarded and lock of 0");
uFlags = GlobalFlags(hMem);
- if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/
+ if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
{
result = TEST_CombineStatus(result, PASSED);
@@ -741,7 +741,7 @@
OUTPUT_Line("Testing after a lock");
OUTPUT_Line("Testing for non-discarded and lock of 0");
uFlags = GlobalFlags(hMem);
- if ((GMEM_LOCKCOUNT & uFlags == 0) && /*no locks*/
+ if (((GMEM_LOCKCOUNT & uFlags) == 0) && /*no locks*/
(((uFlags >> 8) & 0xff) == 0 )) /*not discarded*/
{
result = TEST_CombineStatus(result, PASSED);
Index: apps/tests/hello/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/hello/makefile,v
retrieving revision 1.16
diff -u -w -r1.16 makefile
--- apps/tests/hello/makefile 2 Jun 2002 19:24:59 -0000 1.16
+++ apps/tests/hello/makefile 13 Nov 2003 02:24:16 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/hivetest/hivetest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/hivetest/hivetest.c,v
retrieving revision 1.6
diff -u -w -r1.6 hivetest.c
--- apps/tests/hivetest/hivetest.c 18 Feb 2003 17:01:10 -0000 1.6
+++ apps/tests/hivetest/hivetest.c 13 Nov 2003 02:24:24 -0000
@@ -113,7 +113,7 @@
void EnumerateKeyTest(void)
{
- HKEY hKey = NULL, hKey1;
+ HKEY hKey = NULL;
OBJECT_ATTRIBUTES ObjectAttributes;
NTSTATUS Status;
UNICODE_STRING KeyName;
@@ -304,7 +304,6 @@
void EnumerateValueTest(void)
{
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
- KEY_BASIC_INFORMATION KeyInformation[5];
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
ULONG Index,Length,i;
@@ -375,7 +374,6 @@
UNICODE_STRING KeyName = UNICODE_STRING_INITIALIZER(L"\\Registry\\Machine\\Software");
ULONG Index,Length,i;
KEY_BASIC_INFORMATION KeyInformation[5];
- KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
#if 0
dprintf("NtOpenKey \\Registry : ");
@@ -494,12 +492,10 @@
void test3(void)
{
- HKEY hKey,hKey1;
+ HKEY hKey;
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyName,ValueName;
+ UNICODE_STRING KeyName;
NTSTATUS Status;
- KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
- ULONG Index,Length,i;
char Buffer[10];
DWORD Result;
dprintf("NtCreateKey non volatile: \n");
@@ -791,14 +787,10 @@
void test5(void)
{
- HKEY hKey,hKey1;
+ HKEY hKey;
OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING KeyName,ValueName;
+ UNICODE_STRING KeyName;
NTSTATUS Status;
- KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
- ULONG Index,Length,i;
- char Buffer[10];
- DWORD Result;
dprintf("NtOpenKey : \n");
dprintf(" \\Registry\\Machine\\Software\\reactos : ");
@@ -823,9 +815,7 @@
UNICODE_STRING KeyName,ValueName;
NTSTATUS Status;
KEY_VALUE_FULL_INFORMATION KeyValueInformation[5];
- ULONG Index,Length,i;
- char Buffer[10];
- DWORD Result;
+ ULONG Length,i;
dprintf("Create target key\n");
dprintf(" Key: \\Registry\\Machine\\SOFTWARE\\Reactos\n");
Index: apps/tests/hivetest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/hivetest/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/hivetest/makefile 9 Feb 2003 18:26:36 -0000 1.1
+++ apps/tests/hivetest/makefile 13 Nov 2003 02:24:24 -0000
@@ -15,6 +15,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/hotkey/hotkey.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/hotkey/hotkey.c,v
retrieving revision 1.1
diff -u -w -r1.1 hotkey.c
--- apps/tests/hotkey/hotkey.c 11 Nov 2003 22:17:18 -0000 1.1
+++ apps/tests/hotkey/hotkey.c 13 Nov 2003 02:24:25 -0000
@@ -1,5 +1,6 @@
#include <windows.h>
#include <stdio.h>
+#include <string.h>
//HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
@@ -26,7 +27,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -44,7 +45,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -73,8 +74,6 @@
{
PAINTSTRUCT ps;
HDC hDC;
- RECT clr, wir;
- char spr[100], sir[100];
switch(msg)
{
Index: apps/tests/hotkey/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/hotkey/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/hotkey/makefile 11 Nov 2003 22:17:18 -0000 1.1
+++ apps/tests/hotkey/makefile 13 Nov 2003 02:24:25 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/icontest/icontest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/icontest/icontest.c,v
retrieving revision 1.4
diff -u -w -r1.4 icontest.c
--- apps/tests/icontest/icontest.c 10 Nov 2003 15:46:28 -0000 1.4
+++ apps/tests/icontest/icontest.c 13 Nov 2003 02:24:26 -0000
@@ -1,5 +1,7 @@
#include <windows.h>
#include "resource.h"
+#include <string.h>
+#include <stdio.h>
#ifndef GetCursorInfo
#define _GetCursorInfo
@@ -100,8 +102,6 @@
HDC hMemDC;
CURSORINFO cursorinfo;
ICONINFO iconinfo;
- HBITMAP hMaskBitmap;
- HBITMAP hColorBitmap;
BITMAP bmp;
RECT rc;
CHAR str[20];
@@ -162,7 +162,7 @@
GetIconInfo(cursorinfo.hCursor, &iconinfo);
TextOut(hDC, 15, 365, titleDrwIco, strlen(titleDrwIco));
- sprintf(str, "Hotspot: %d; %d", iconinfo.xHotspot, iconinfo.yHotspot);
+ sprintf(str, "Hotspot: %ld; %ld", iconinfo.xHotspot, iconinfo.yHotspot);
TextOut(hDC, 15, 380, str, strlen(str));
if(iconinfo.hbmMask)
Index: apps/tests/icontest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/icontest/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/icontest/makefile 27 May 2003 20:51:39 -0000 1.1
+++ apps/tests/icontest/makefile 13 Nov 2003 02:24:26 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/isotest/isotest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/isotest/isotest.c,v
retrieving revision 1.4
diff -u -w -r1.4 isotest.c
--- apps/tests/isotest/isotest.c 8 Sep 2002 10:21:58 -0000 1.4
+++ apps/tests/isotest/isotest.c 13 Nov 2003 02:24:27 -0000
@@ -6,6 +6,8 @@
//#include <winioctl.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
void HexDump(char *buffer, ULONG size)
@@ -138,7 +140,6 @@
{
HANDLE hDisk;
DWORD dwRead;
- DWORD i;
char *Buffer;
CHAR Filename[80];
LARGE_INTEGER FilePosition;
Index: apps/tests/isotest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/isotest/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/isotest/makefile 2 Jun 2002 19:24:59 -0000 1.2
+++ apps/tests/isotest/makefile 13 Nov 2003 02:24:27 -0000
@@ -16,6 +16,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/lineclip/lineclip.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/lineclip/lineclip.c,v
retrieving revision 1.2
diff -u -w -r1.2 lineclip.c
--- apps/tests/lineclip/lineclip.c 20 Sep 2003 14:44:34 -0000 1.2
+++ apps/tests/lineclip/lineclip.c 13 Nov 2003 02:24:28 -0000
@@ -25,7 +25,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -43,7 +43,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -121,9 +121,8 @@
{
PAINTSTRUCT ps;
HDC hDC;
- RECT clr, wir;
+ RECT clr;
HRGN ClipRgn, ExcludeRgn;
- char spr[100], sir[100];
RECT Rect;
switch(msg)
Index: apps/tests/lineclip/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/lineclip/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/lineclip/makefile 14 Jul 2003 09:47:47 -0000 1.1
+++ apps/tests/lineclip/makefile 13 Nov 2003 02:24:28 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/linetest/linetest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/linetest/linetest.c,v
retrieving revision 1.3
diff -u -w -r1.3 linetest.c
--- apps/tests/linetest/linetest.c 11 Aug 2003 03:55:47 -0000 1.3
+++ apps/tests/linetest/linetest.c 13 Nov 2003 02:24:29 -0000
@@ -27,7 +27,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -45,7 +45,7 @@
NULL);
if (hWnd == NULL)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -143,7 +143,7 @@
PAINTSTRUCT ps;
HDC hDC;
RECT clr;
- HBRUSH hbr, hbrold;
+ HBRUSH hbr;
switch(msg)
{
Index: apps/tests/linetest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/linetest/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/linetest/makefile 8 Aug 2003 21:53:04 -0000 1.1
+++ apps/tests/linetest/makefile 13 Nov 2003 02:24:29 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/lock/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/lock/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/lock/Makefile 25 Jan 2003 15:46:52 -0000 1.1
+++ apps/tests/lock/Makefile 13 Nov 2003 02:24:29 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/lock/lock.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/lock/lock.c,v
retrieving revision 1.2
diff -u -w -r1.2 lock.c
--- apps/tests/lock/lock.c 18 Oct 2003 18:49:07 -0000 1.2
+++ apps/tests/lock/lock.c 13 Nov 2003 02:24:29 -0000
@@ -15,7 +15,7 @@
stat = LockFileEx(hFile,LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl) ;
- printf("Slock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
+ printf("Slock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat;
}
@@ -32,7 +32,7 @@
stat = LockFileEx(hFile,LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,0,len,0,&overl);
- printf("Xlock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
+ printf("Xlock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat;
@@ -48,7 +48,7 @@
overl.hEvent = 0;
stat = UnlockFileEx(hFile,0,len,0,&overl) ;
- printf("unlock %i-%i %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
+ printf("unlock %li-%li %s\n",start,start+len,stat!=0 ? "OK" : "FAILED");
return stat;
}
Index: apps/tests/lpc/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/lpc/makefile,v
retrieving revision 1.15
diff -u -w -r1.15 makefile
--- apps/tests/lpc/makefile 5 Apr 2003 09:37:41 -0000 1.15
+++ apps/tests/lpc/makefile 13 Nov 2003 02:24:30 -0000
@@ -10,7 +10,7 @@
PROGS= lpcsrv.exe lpcclt.exe
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a
Index: apps/tests/map_dup_inherit/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/map_dup_inherit/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/map_dup_inherit/makefile 31 Oct 2003 20:26:14 -0000 1.1
+++ apps/tests/map_dup_inherit/makefile 13 Nov 2003 02:24:30 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/map_dup_inherit/map_dup_inherit.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/map_dup_inherit/map_dup_inherit.c,v
retrieving revision 1.1
diff -u -w -r1.1 map_dup_inherit.c
--- apps/tests/map_dup_inherit/map_dup_inherit.c 31 Oct 2003 20:26:14 -0000 1.1
+++ apps/tests/map_dup_inherit/map_dup_inherit.c 13 Nov 2003 02:24:30 -0000
@@ -1,5 +1,7 @@
#include <stdio.h>
#include <windows.h>
+#include <stdlib.h>
+#include <string.h>
/* This tests the ability of the target win32 to create an anonymous file
* mapping, create a mapping view with MapViewOfFile, and then realize the
@@ -11,10 +13,10 @@
void *file_map;
int *x;
- fprintf( stderr, "%d: Starting\n", GetCurrentProcessId() );
+ fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) {
- file_map = atoi(argv[1]);
+ file_map = (void *)atoi(argv[1]);
} else {
file_map = CreateFileMapping( INVALID_HANDLE_VALUE,
NULL,
@@ -23,14 +25,14 @@
if( !SetHandleInformation( file_map,
HANDLE_FLAG_INHERIT,
HANDLE_FLAG_INHERIT ) ) {
- fprintf( stderr, "%d: Could not make handle inheritable.\n",
+ fprintf( stderr, "%lu: Could not make handle inheritable.\n",
GetCurrentProcessId() );
return 100;
}
}
if( !file_map ) {
- fprintf( stderr, "%d: Could not create anonymous file map.\n",
+ fprintf( stderr, "%lu: Could not create anonymous file map.\n",
GetCurrentProcessId() );
return 1;
}
@@ -42,13 +44,13 @@
0x1000 );
if( !file_view ) {
- fprintf( stderr, "%d: Could not map view of file.\n",
+ fprintf( stderr, "%lu: Could not map view of file.\n",
GetCurrentProcessId() );
return 2;
}
if( !VirtualAlloc( file_view, 0x1000, MEM_COMMIT, PAGE_READWRITE ) ) {
- fprintf( stderr, "%d: VirtualAlloc failed to realize the page.\n",
+ fprintf( stderr, "%lu: VirtualAlloc failed to realize the page.\n",
GetCurrentProcessId() );
return 3;
}
@@ -57,8 +59,8 @@
x[0] = 0x12345678;
if( x[0] != 0x12345678 ) {
- fprintf( stderr, "%d: Can't write to the memory (%08x != 0x12345678)\n",
- GetCurrentProcessId() );
+ fprintf( stderr, "%lu: Can't write to the memory (%08x != 0x12345678)\n",
+ GetCurrentProcessId(), x[0] );
return 4;
}
@@ -73,13 +75,13 @@
sprintf(cmdline,"%s %d", argv[0], (int)file_map);
if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
&si, &pi ) ) {
- fprintf( stderr, "%d: Could not create child process.\n",
+ fprintf( stderr, "%lu: Could not create child process.\n",
GetCurrentProcessId() );
return 5;
}
if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) {
- fprintf( stderr, "%d: Failed to wait for child process to terminate.\n",
+ fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n",
GetCurrentProcessId() );
return 6;
}
Index: apps/tests/messagebox/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/messagebox/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/messagebox/makefile 18 Mar 2003 00:55:22 -0000 1.1
+++ apps/tests/messagebox/makefile 13 Nov 2003 02:24:30 -0000
@@ -13,6 +13,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/mktime/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/mktime/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/mktime/makefile 25 Sep 2002 01:09:49 -0000 1.1
+++ apps/tests/mktime/makefile 13 Nov 2003 02:24:31 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/mktime/mktime.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/mktime/mktime.c,v
retrieving revision 1.1
diff -u -w -r1.1 mktime.c
Index: apps/tests/mstest/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/mstest/Makefile,v
retrieving revision 1.8
diff -u -w -r1.8 Makefile
--- apps/tests/mstest/Makefile 5 Apr 2003 09:37:41 -0000 1.8
+++ apps/tests/mstest/Makefile 13 Nov 2003 02:24:31 -0000
@@ -10,7 +10,7 @@
PROGS = msserver.exe msclient.exe
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a
Index: apps/tests/multiwin/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/multiwin/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/multiwin/makefile 26 May 2003 10:51:20 -0000 1.1
+++ apps/tests/multiwin/makefile 13 Nov 2003 02:24:31 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/multiwin/multiwin.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/multiwin/multiwin.c,v
retrieving revision 1.3
diff -u -w -r1.3 multiwin.c
--- apps/tests/multiwin/multiwin.c 9 Sep 2003 09:40:19 -0000 1.3
+++ apps/tests/multiwin/multiwin.c 13 Nov 2003 02:24:32 -0000
@@ -28,7 +28,7 @@
wc.cbWndExtra = 0;
if (RegisterClass(&wc) == 0)
{
- fprintf(stderr, "RegisterClass failed (last error 0x%X)\n",
+ fprintf(stderr, "RegisterClass failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
@@ -71,7 +71,7 @@
if (! hWnd1 || ! hWnd2 || ! hWndChild)
{
- fprintf(stderr, "CreateWindow failed (last error 0x%X)\n",
+ fprintf(stderr, "CreateWindow failed (last error 0x%lX)\n",
GetLastError());
return(1);
}
Index: apps/tests/mutex/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/mutex/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/mutex/makefile 2 Jun 2002 19:24:59 -0000 1.2
+++ apps/tests/mutex/makefile 13 Nov 2003 02:24:32 -0000
@@ -15,6 +15,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/nptest/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/nptest/Makefile,v
retrieving revision 1.8
diff -u -w -r1.8 Makefile
--- apps/tests/nptest/Makefile 5 Apr 2003 09:37:41 -0000 1.8
+++ apps/tests/nptest/Makefile 13 Nov 2003 02:24:32 -0000
@@ -10,7 +10,7 @@
PROGS = npserver.exe npclient.exe
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Wall -Werror
LIBS = $(SDK_PATH_LIB)/kernel32.a
Index: apps/tests/p_dup_handle/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/p_dup_handle/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/p_dup_handle/makefile 31 Oct 2003 21:41:32 -0000 1.1
+++ apps/tests/p_dup_handle/makefile 13 Nov 2003 02:24:32 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/p_dup_handle/p_dup_handle.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/p_dup_handle/p_dup_handle.c,v
retrieving revision 1.1
diff -u -w -r1.1 p_dup_handle.c
--- apps/tests/p_dup_handle/p_dup_handle.c 31 Oct 2003 21:41:32 -0000 1.1
+++ apps/tests/p_dup_handle/p_dup_handle.c 13 Nov 2003 02:24:33 -0000
@@ -1,5 +1,7 @@
#include <stdio.h>
#include <windows.h>
+#include <stdlib.h>
+#include <string.h>
/* This tests the ability of the target win32 to duplicate a process handle,
* spawn a child, and have the child dup it's own handle back into the parent
@@ -10,10 +12,10 @@
HANDLE h_process;
HANDLE h_process_in_parent;
- fprintf( stderr, "%d: Starting\n", GetCurrentProcessId() );
+ fprintf( stderr, "%lu: Starting\n", GetCurrentProcessId() );
if( argc == 2 ) {
- h_process = atoi(argv[1]);
+ h_process = (HANDLE)atoi(argv[1]);
} else {
if( !DuplicateHandle( GetCurrentProcess(),
GetCurrentProcess(),
@@ -22,7 +24,7 @@
0,
TRUE,
DUPLICATE_SAME_ACCESS) ) {
- fprintf( stderr, "%d: Could not duplicate my own process handle.\n",
+ fprintf( stderr, "%lu: Could not duplicate my own process handle.\n",
GetCurrentProcessId() );
return 101;
}
@@ -36,16 +38,16 @@
memset( &si, 0, sizeof( si ) );
memset( &pi, 0, sizeof( pi ) );
- sprintf( cmdline, "%s %d", argv[0], h_process );
+ sprintf( cmdline, "%s %lu", argv[0], (DWORD)h_process );
if( !CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, NULL, NULL,
&si, &pi ) ) {
- fprintf( stderr, "%d: Could not create child process.\n",
+ fprintf( stderr, "%lu: Could not create child process.\n",
GetCurrentProcessId() );
return 5;
}
if( WaitForSingleObject( pi.hThread, INFINITE ) != WAIT_OBJECT_0 ) {
- fprintf( stderr, "%d: Failed to wait for child process to terminate.\n",
+ fprintf( stderr, "%lu: Failed to wait for child process to terminate.\n",
GetCurrentProcessId() );
return 6;
}
@@ -57,7 +59,7 @@
0,
TRUE,
DUPLICATE_SAME_ACCESS) ) {
- fprintf( stderr, "%d: Could not duplicate my handle into the parent.\n",
+ fprintf( stderr, "%lu: Could not duplicate my handle into the parent.\n",
GetCurrentProcessId() );
return 102;
}
More information about the Ros-kernel
mailing list