[ros-kernel] some patches to fix some warnnings
Jonathan Wilson
jonwil at tpgi.com.au
Thu Nov 13 11:06:26 CET 2003
-------------- next part --------------
Index: apps/tests/palbitblt/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/palbitblt/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/palbitblt/makefile 10 Sep 2003 20:15:46 -0000 1.1
+++ apps/tests/palbitblt/makefile 13 Nov 2003 02:24:33 -0000
@@ -1,4 +1,3 @@
-
PATH_TO_TOP = ../../..
TARGET_NORC = yes
@@ -13,6 +12,8 @@
TARGET_OBJECTS = pal.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/patblt/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/patblt/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/patblt/makefile 23 Aug 2003 20:55:40 -0000 1.2
+++ apps/tests/patblt/makefile 13 Nov 2003 02:24:33 -0000
@@ -9,9 +9,9 @@
TARGET_NORC = yes
-TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Werror -Wall
-TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \
kernel32.a \
Index: apps/tests/pipe/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/pipe/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/pipe/Makefile 31 May 2003 20:26:49 -0000 1.1
+++ apps/tests/pipe/Makefile 13 Nov 2003 02:24:33 -0000
@@ -9,7 +9,7 @@
TARGET_NAME = pipe
-TARGET_CFLAGS = -DSTANDALONE
+TARGET_CFLAGS = -DSTANDALONE -Wall -Werror
TARGET_SDKLIBS = ntdll.a kernel32.a
Index: apps/tests/pipe/pipe.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/pipe/pipe.c,v
retrieving revision 1.1
diff -u -w -r1.1 pipe.c
--- apps/tests/pipe/pipe.c 31 May 2003 20:26:49 -0000 1.1
+++ apps/tests/pipe/pipe.c 13 Nov 2003 02:24:37 -0000
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <time.h>
#include <assert.h>
+#include <string.h>
#ifndef STANDALONE
#include "wine/test.h"
@@ -588,6 +589,7 @@
}
+int
START_TEST(pipe)
{
msg("test 1 of 4:\n");
@@ -599,4 +601,5 @@
msg("test 4 of 4:\n");
test_CreateNamedPipe();
msg("all tests done\n");
+ return 0;
}
Index: apps/tests/primitives/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/primitives/Makefile,v
retrieving revision 1.3
diff -u -w -r1.3 Makefile
--- apps/tests/primitives/Makefile 23 Aug 2003 06:26:46 -0000 1.3
+++ apps/tests/primitives/Makefile 13 Nov 2003 02:24:38 -0000
@@ -14,9 +14,9 @@
TARGET_NORC = yes
-TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
-TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \
kernel32.a \
Index: apps/tests/pteb/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/pteb/Makefile,v
retrieving revision 1.8
diff -u -w -r1.8 Makefile
--- apps/tests/pteb/Makefile 2 Jun 2002 19:25:00 -0000 1.8
+++ apps/tests/pteb/Makefile 13 Nov 2003 02:24:38 -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/pteb/pteb.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/pteb/pteb.c,v
retrieving revision 1.5
diff -u -w -r1.5 pteb.c
--- apps/tests/pteb/pteb.c 8 Sep 2002 10:21:59 -0000 1.5
+++ apps/tests/pteb/pteb.c 13 Nov 2003 02:24:38 -0000
@@ -15,9 +15,9 @@
Teb = (PTEB)x;
- printf("StackBase: 0x%08lX\n", Teb->Tib.StackBase);
- printf("StackLimit: 0x%08lX\n", Teb->Tib.StackLimit);
- printf("DeallocationStack: 0x%08lX\n", Teb->DeallocationStack);
+ printf("StackBase: 0x%08lX\n", (DWORD)Teb->Tib.StackBase);
+ printf("StackLimit: 0x%08lX\n", (DWORD)Teb->Tib.StackLimit);
+ printf("DeallocationStack: 0x%08lX\n", (DWORD)Teb->DeallocationStack);
return(0);
}
Index: apps/tests/regdump/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/regdump/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/regdump/makefile 24 Nov 2002 19:13:40 -0000 1.2
+++ apps/tests/regdump/makefile 13 Nov 2003 02:24:38 -0000
@@ -18,6 +18,8 @@
TARGET_OBJECTS = $(TARGET_NAME).o regcmds.o regproc.o main.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/regtest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/regtest/makefile,v
retrieving revision 1.7
diff -u -w -r1.7 makefile
--- apps/tests/regtest/makefile 2 Jun 2002 19:25:00 -0000 1.7
+++ apps/tests/regtest/makefile 13 Nov 2003 02:24:38 -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/regtest/regtest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/regtest/regtest.c,v
retrieving revision 1.14
diff -u -w -r1.14 regtest.c
--- apps/tests/regtest/regtest.c 1 Dec 2002 19:16:26 -0000 1.14
+++ apps/tests/regtest/regtest.c 13 Nov 2003 02:24:45 -0000
@@ -584,14 +584,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 : ");
@@ -616,9 +612,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/sectest/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/sectest/Makefile,v
retrieving revision 1.3
diff -u -w -r1.3 Makefile
--- apps/tests/sectest/Makefile 2 Jun 2002 19:25:00 -0000 1.3
+++ apps/tests/sectest/Makefile 13 Nov 2003 02:24:45 -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/sectest/sectest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/sectest/sectest.c,v
retrieving revision 1.4
diff -u -w -r1.4 sectest.c
--- apps/tests/sectest/sectest.c 8 Sep 2002 10:22:01 -0000 1.4
+++ apps/tests/sectest/sectest.c 13 Nov 2003 02:24:46 -0000
@@ -2,6 +2,8 @@
#define UNICODE
#define _UNICODE
#include <windows.h>
+#include <stdio.h>
+#include <string.h>
int main(int argc, char* argv[])
{
@@ -20,7 +22,7 @@
0);
if (hFile == INVALID_HANDLE_VALUE)
{
- printf("Failed to create file (err=%d)", GetLastError());
+ printf("Failed to create file (err=%ld)", GetLastError());
return 1;
}
@@ -32,7 +34,7 @@
NULL);
if (Section == NULL)
{
- printf("Failed to create section (err=%d)", GetLastError());
+ printf("Failed to create section (err=%ld)", GetLastError());
return 1;
}
@@ -45,7 +47,7 @@
printf("BaseAddress %x\n", (UINT) BaseAddress);
if (BaseAddress == NULL)
{
- printf("Failed to map section (%d)\n", GetLastError());
+ printf("Failed to map section (%ld)\n", GetLastError());
return 1;
}
@@ -56,13 +58,13 @@
if (!UnmapViewOfFile(BaseAddress))
{
- printf("Failed to unmap view of file (%d)\n", GetLastError());
+ printf("Failed to unmap view of file (%ld)\n", GetLastError());
return 1;
}
if (!CloseHandle(hFile))
{
- printf("Failed to close file (%d)\n", GetLastError());
+ printf("Failed to close file (%ld)\n", GetLastError());
return 1;
}
Index: apps/tests/sertest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/sertest/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/sertest/makefile 3 Oct 2002 19:43:31 -0000 1.1
+++ apps/tests/sertest/makefile 13 Nov 2003 02:24:46 -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/sertest/sertest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/sertest/sertest.c,v
retrieving revision 1.2
diff -u -w -r1.2 sertest.c
--- apps/tests/sertest/sertest.c 10 Nov 2002 13:48:51 -0000 1.2
+++ apps/tests/sertest/sertest.c 13 Nov 2003 02:24:46 -0000
@@ -11,7 +11,6 @@
CHAR rxBuffer[BUFSIZE];
DWORD dwBaud = 9600;
DWORD dwNumWritten;
- DWORD dwNumRead;
DWORD dwErrors;
DCB dcb;
BOOL bResult;
@@ -40,20 +39,20 @@
NULL); // no template
if (hPort == (HANDLE)-1) {
- printf("ERROR: CreateFile() failed with result: %lx\n", hPort);
+ printf("ERROR: CreateFile() failed with result: %lx\n", (DWORD)hPort);
return 1;
}
- printf("CreateFile() returned: %lx\n", hPort);
+ printf("CreateFile() returned: %lx\n", (DWORD)hPort);
printf("Fiddling with DTR and RTS control lines...\n");
for (i = 0; i < 100; i++) {
bResult = EscapeCommFunction(hPort, SETDTR);
if (!bResult) {
- printf("WARNING: EscapeCommFunction(SETDTR) failed: %lx\n", bResult);
+ printf("WARNING: EscapeCommFunction(SETDTR) failed: %lx\n", (DWORD)bResult);
}
bResult = EscapeCommFunction(hPort, SETRTS);
if (!bResult) {
- printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", bResult);
+ printf("WARNING: EscapeCommFunction(SETRTS) failed: %lx\n", (DWORD)bResult);
}
for (j = 0; j < 1000; j++) {
k *= j;
@@ -70,17 +69,17 @@
*/
bResult = EscapeCommFunction(hPort, CLRDTR);
if (!bResult) {
- printf("WARNING: EscapeCommFunction(CLRDTR) failed: %lx\n", bResult);
+ printf("WARNING: EscapeCommFunction(CLRDTR) failed: %lx\n", (DWORD)bResult);
}
bResult = EscapeCommFunction(hPort, CLRRTS);
if (!bResult) {
- printf("WARNING: EscapeCommFunction(CLRRTS) failed: %lx\n", bResult);
+ printf("WARNING: EscapeCommFunction(CLRRTS) failed: %lx\n", (DWORD)bResult);
}
}
printf("Getting the default line characteristics...\n");
dcb.DCBlength = sizeof(DCB);
if (!GetCommState(hPort, &dcb)) {
- printf("ERROR: failed to get the dcb: %d\n", GetLastError());
+ printf("ERROR: failed to get the dcb: %ld\n", GetLastError());
return 2;
}
printf("Setting the line characteristics to 9600,8,N,1\n");
@@ -91,7 +90,7 @@
bResult = SetCommState(hPort, &dcb);
if (!bResult) {
- printf("ERROR: failed to set the comm state: %lx\n", bResult);
+ printf("ERROR: failed to set the comm state: %lx\n", (DWORD)bResult);
return 3;
}
for (i = 0; i < BUFSIZE; i++) {
@@ -103,28 +102,28 @@
printf("Writting transmit buffer to the serial port\n");
bResult = WriteFile(hPort, txBuffer, BUFSIZE, &dwNumWritten, NULL);
if (!bResult) {
- printf("ERROR: failed to write to the serial port: %lx\n", bResult);
+ printf("ERROR: failed to write to the serial port: %lx\n", (DWORD)bResult);
return 4;
}
- printf("WriteFile() returned: %lx, byteswritten: %lx\n", bResult, dwNumWritten);
+ printf("WriteFile() returned: %lx, byteswritten: %lx\n", (DWORD)bResult, dwNumWritten);
#if 0
printf("Attempting to read %d bytes from the serial port\n", BUFSIZE);
bResult = ReadFile(hPort, rxBuffer, BUFSIZE, &dwNumRead, NULL);
if (!bResult) {
- printf("ERROR: failed to read from the serial port: %lx\n", bResult);
+ printf("ERROR: failed to read from the serial port: %lx\n", (DWORD)bResult);
return 5;
}
- printf("ReadFile() returned: %lx, bytesread: %lx\n", bResult, dwNumRead);
+ printf("ReadFile() returned: %lx, bytesread: %lx\n", (DWORD)bResult, dwNumRead);
for (i = 0; i < BUFSIZE; i++) {
printf(" %d ",rxBuffer[i]);
}
#endif
printf("Attempting to close the serial port\n");
bResult = ClearCommError(hPort, &dwErrors, NULL);
- printf("ClearCommError returned: %lx, dwErrors: %lx\n", bResult, dwErrors);
+ printf("ClearCommError returned: %lx, dwErrors: %lx\n", (DWORD)bResult, dwErrors);
bResult = CloseHandle(hPort);
if (!bResult) {
- printf("ERROR: failed to close the serial port: %lx\n", bResult);
+ printf("ERROR: failed to close the serial port: %lx\n", (DWORD)bResult);
return 6;
}
printf("Finished\n");
Index: apps/tests/shaptest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/shaptest/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/shaptest/makefile 15 Aug 2003 18:51:31 -0000 1.2
+++ apps/tests/shaptest/makefile 13 Nov 2003 02:24:47 -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/shm/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/shm/makefile,v
retrieving revision 1.12
diff -u -w -r1.12 makefile
--- apps/tests/shm/makefile 5 Apr 2003 09:37:41 -0000 1.12
+++ apps/tests/shm/makefile 13 Nov 2003 02:24:47 -0000
@@ -10,7 +10,7 @@
PROGS= shmsrv.exe shmclt.exe
-BASE_CFLAGS = -I$(PATH_TO_TOP)/include
+BASE_CFLAGS = -I$(PATH_TO_TOP)/include -Werror -Wall
LIBS = $(SDK_PATH_LIB)/kernel32.a \
$(SDK_PATH_LIB)/ntdll.a
Index: apps/tests/statst/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/statst/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/statst/Makefile 16 Jun 2003 13:51:16 -0000 1.1
+++ apps/tests/statst/Makefile 13 Nov 2003 02:24:47 -0000
@@ -1,4 +1,3 @@
-
PATH_TO_TOP = ../../..
TARGET_NORC = yes
@@ -13,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/statst2/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/statst2/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/statst2/Makefile 15 Jul 2003 00:00:38 -0000 1.1
+++ apps/tests/statst2/Makefile 13 Nov 2003 02:24:47 -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/stretchblt/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/stretchblt/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/stretchblt/makefile 23 Aug 2003 21:13:18 -0000 1.2
+++ apps/tests/stretchblt/makefile 13 Nov 2003 02:24:47 -0000
@@ -9,9 +9,9 @@
TARGET_NORC = yes
-TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
-TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \
kernel32.a \
Index: apps/tests/stretchblt/stretchblt.cpp
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/stretchblt/stretchblt.cpp,v
retrieving revision 1.2
diff -u -w -r1.2 stretchblt.cpp
--- apps/tests/stretchblt/stretchblt.cpp 24 Jan 2003 19:48:13 -0000 1.2
+++ apps/tests/stretchblt/stretchblt.cpp 13 Nov 2003 02:24:49 -0000
@@ -20,6 +20,8 @@
const int ID_LISTBOX = 101;
HINSTANCE HInst;
+HINSTANCE HPrevInst;
+TCHAR *cmdline;
const char* WndClassName = "GMainWnd";
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
LPARAM LParam);
@@ -29,6 +31,8 @@
LPTSTR lpCmdLine, int nCmdShow)
{
HInst = HInstance;
+ HPrevInst = HPrevInstance;
+ cmdline = lpCmdLine;
WNDCLASS wc;
memset(&wc, 0, sizeof(WNDCLASS));
Index: apps/tests/subclass/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/subclass/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/subclass/makefile 8 Nov 2003 22:10:15 -0000 1.1
+++ apps/tests/subclass/makefile 13 Nov 2003 02:24:49 -0000
@@ -14,7 +14,7 @@
TARGET_OBJECTS = $(TARGET_NAME).o
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
include $(PATH_TO_TOP)/rules.mak
Index: apps/tests/suspend/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/suspend/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/suspend/Makefile 20 Jul 2003 12:17:19 -0000 1.1
+++ apps/tests/suspend/Makefile 13 Nov 2003 02:24:49 -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/suspend/suspend.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/suspend/suspend.c,v
retrieving revision 1.2
diff -u -w -r1.2 suspend.c
--- apps/tests/suspend/suspend.c 20 Sep 2003 14:44:34 -0000 1.2
+++ apps/tests/suspend/suspend.c 13 Nov 2003 02:24:50 -0000
@@ -3,6 +3,7 @@
#define NTOS_MODE_USER
#include <ntos.h>
#include <windows.h>
+#include <stdio.h>
#define DBG
#define NDEBUG
@@ -58,11 +59,11 @@
for(;;)
{
- printf("%x ", z);
+ printf("%lx ", z);
Sleep(100);x++;
if(x>100 && GetThreadContext(thread, &context))
{
- printf("EIP: %x\n", context.Eip);
+ printf("EIP: %lx\n", context.Eip);
printf("Calling resumethread ... \n");
ResumeThread(thread);
}
Index: apps/tests/tcpsvr/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tcpsvr/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/tcpsvr/makefile 17 Jun 2002 06:01:17 -0000 1.1
+++ apps/tests/tcpsvr/makefile 13 Nov 2003 02:24: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/tcpsvr/tcpsvr.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tcpsvr/tcpsvr.c,v
retrieving revision 1.2
diff -u -w -r1.2 tcpsvr.c
--- apps/tests/tcpsvr/tcpsvr.c 23 Aug 2003 16:37:18 -0000 1.2
+++ apps/tests/tcpsvr/tcpsvr.c 13 Nov 2003 02:24:51 -0000
@@ -12,6 +12,8 @@
#include <winsock2.h>
#include <stdio.h>
+#include <string.h>
+#include <io.h>
#undef ERROR
#define SUCCESS 0
Index: apps/tests/terminate/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/terminate/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/terminate/Makefile 21 Jul 2003 21:44:28 -0000 1.1
+++ apps/tests/terminate/Makefile 13 Nov 2003 02:24: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/terminate/terminate.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/terminate/terminate.c,v
retrieving revision 1.2
diff -u -w -r1.2 terminate.c
--- apps/tests/terminate/terminate.c 20 Sep 2003 14:44:34 -0000 1.2
+++ apps/tests/terminate/terminate.c 13 Nov 2003 02:24:51 -0000
@@ -3,6 +3,7 @@
#define NTOS_MODE_USER
#include <ntos.h>
#include <windows.h>
+#include <stdio.h>
#define DBG
#define NDEBUG
Index: apps/tests/tests/GetSysMetrics/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/GetSysMetrics/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- apps/tests/tests/GetSysMetrics/Makefile 10 Jul 2002 20:10:15 -0000 1.1
+++ apps/tests/tests/GetSysMetrics/Makefile 13 Nov 2003 02:24: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/tests/GetSystemInfo/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/GetSystemInfo/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/GetSystemInfo/Makefile 10 Jul 2002 20:10:15 -0000 1.2
+++ apps/tests/tests/GetSystemInfo/Makefile 13 Nov 2003 02:24:51 -0000
@@ -8,7 +8,7 @@
OBJECTS = GetSystemInfo.o
LIBS =
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/Parent_Child/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/Parent_Child/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/Parent_Child/Makefile 10 Jul 2002 20:10:15 -0000 1.2
+++ apps/tests/tests/Parent_Child/Makefile 13 Nov 2003 02:24:51 -0000
@@ -8,7 +8,7 @@
OBJECTS = Parent_Child.o
LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/guitest/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/guitest/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/guitest/Makefile 10 Jul 2002 20:10:15 -0000 1.2
+++ apps/tests/tests/guitest/Makefile 13 Nov 2003 02:24:52 -0000
@@ -8,7 +8,7 @@
OBJECTS = guitest.o
LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/hello/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/hello/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/hello/Makefile 10 Jul 2002 20:10:15 -0000 1.2
+++ apps/tests/tests/hello/Makefile 13 Nov 2003 02:24:52 -0000
@@ -8,7 +8,7 @@
OBJECTS = hello.o
LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/new/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/new/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/new/Makefile 10 Jul 2002 20:10:16 -0000 1.2
+++ apps/tests/tests/new/Makefile 13 Nov 2003 02:24:52 -0000
@@ -8,7 +8,7 @@
OBJECTS = new.o
LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/rolex/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/rolex/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/tests/tests/rolex/Makefile 10 Jul 2002 20:10:16 -0000 1.2
+++ apps/tests/tests/rolex/Makefile 13 Nov 2003 02:24:52 -0000
@@ -8,7 +8,7 @@
OBJECTS = rolex.o
LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a
-CFLAGS =
+CFLAGS = -Wall -Werror
all: $(PROGS:%=%.exe)
Index: apps/tests/tests/volinfo/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tests/volinfo/Makefile,v
retrieving revision 1.3
diff -u -w -r1.3 Makefile
--- apps/tests/tests/volinfo/Makefile 20 Jul 2003 22:55:39 -0000 1.3
+++ apps/tests/tests/volinfo/Makefile 13 Nov 2003 02:24:52 -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/thread/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/thread/makefile,v
retrieving revision 1.7
diff -u -w -r1.7 makefile
--- apps/tests/thread/makefile 2 Jun 2002 19:25:01 -0000 1.7
+++ apps/tests/thread/makefile 13 Nov 2003 02:24:52 -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/thread/thread.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/thread/thread.c,v
retrieving revision 1.8
diff -u -w -r1.8 thread.c
--- apps/tests/thread/thread.c 9 Aug 2002 17:23:56 -0000 1.8
+++ apps/tests/thread/thread.c 13 Nov 2003 02:24:53 -0000
@@ -40,7 +40,6 @@
int main (int argc, char* argv[])
{
- HANDLE hThread;
DWORD i=0;
DWORD id;
ULONG nr;
Index: apps/tests/thread_msg/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/thread_msg/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/thread_msg/makefile 23 Jul 2003 17:00:55 -0000 1.1
+++ apps/tests/thread_msg/makefile 13 Nov 2003 02:24:53 -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/thread_msg/thread_msg.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/thread_msg/thread_msg.c,v
retrieving revision 1.1
diff -u -w -r1.1 thread_msg.c
--- apps/tests/thread_msg/thread_msg.c 23 Jul 2003 17:00:55 -0000 1.1
+++ apps/tests/thread_msg/thread_msg.c 13 Nov 2003 02:24:53 -0000
@@ -41,7 +41,7 @@
/* Now read some messages */
while( GetMessage( &msg, 0,0,0 ) ) {
- printf( "Received message: %04x %04x %08x\n",
+ printf( "Received message: %04x %04x %08lx\n",
(msg.message & 0xffff),
(msg.wParam & 0xffff),
msg.lParam );
@@ -56,7 +56,7 @@
int main( int argc, char **argv )
{
- DWORD id, Status;
+ DWORD id;
printf( "Creating events\n" );
Index: apps/tests/threadwait/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/threadwait/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/threadwait/makefile 10 Sep 2003 06:12:21 -0000 1.1
+++ apps/tests/threadwait/makefile 13 Nov 2003 02:24:53 -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/threadwait/threadwait.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/threadwait/threadwait.c,v
retrieving revision 1.1
diff -u -w -r1.1 threadwait.c
--- apps/tests/threadwait/threadwait.c 10 Sep 2003 06:12:21 -0000 1.1
+++ apps/tests/threadwait/threadwait.c 13 Nov 2003 02:24:54 -0000
@@ -21,7 +21,7 @@
HANDLE Thread;
Thread = CreateThread(0, 0, threadfunc, 0, 0, &id);
- printf("Main: ThreadId for new thread is %08x\n", id);
+ printf("Main: ThreadId for new thread is %08lx\n", id);
printf("Main: Waiting on thread...\n");
WaitForSingleObject(Thread, INFINITE);
printf("Main: OK, somebody fixed the PsUnblockThread spinlock double-acquire crash\n");
Index: apps/tests/tokentest/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tokentest/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/tokentest/makefile 30 Jul 2003 14:08:16 -0000 1.2
+++ apps/tests/tokentest/makefile 13 Nov 2003 02:24:54 -0000
@@ -14,6 +14,8 @@
TARGET_OBJECTS = tokentest.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
Index: apps/tests/tokentest/tokentest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/tokentest/tokentest.c,v
retrieving revision 1.7
diff -u -w -r1.7 tokentest.c
--- apps/tests/tokentest/tokentest.c 25 Oct 2002 21:48:00 -0000 1.7
+++ apps/tests/tokentest/tokentest.c 13 Nov 2003 02:24:57 -0000
@@ -3,6 +3,7 @@
#define ANONYMOUSUNIONS
#include <windows.h>
+#include <stdlib.h>
#define INCLUDE_THE_DDK_HEADERS
#ifdef INCLUDE_THE_DDK_HEADERS
@@ -161,7 +162,7 @@
UNICODE_STRING scSid;
RtlConvertSidToUnicodeString(&scSid, pSid->Sid, TRUE);
- printf("%wZ [", &scSid);
+ printf("%.*ls [", scSid.Length, scSid.Buffer);
LocalFree(scSid.Buffer);
if ( EqualSid(pSid->Sid, pOwner->Owner) )
@@ -217,7 +218,7 @@
DWORD cbName = sizeof(buffer) / sizeof(buffer[0]);
LookupPrivilegeName(0, &pPriv->Privileges[i].Luid, buffer, &cbName);
- printf("%S{0x%08x, 0x%08x} [", buffer, pPriv->Privileges[i].Luid.HighPart, pPriv->Privileges[i].Luid.LowPart);
+ printf("%S{0x%08lx, 0x%08lx} [", buffer, pPriv->Privileges[i].Luid.HighPart, pPriv->Privileges[i].Luid.LowPart);
if ( pPriv->Privileges[i].Attributes & SE_PRIVILEGE_ENABLED )
printf("enabled,");
@@ -254,7 +255,7 @@
status = RtlGetAce(pAcl, i, (ROS_ACE**) &pAce);
if ( ! NT_SUCCESS(status) )
{
- printf("RtlGetAce(): status = 0x%08x\n", status);
+ printf("RtlGetAce(): status = 0x%08lx\n", status);
break;
}
@@ -267,11 +268,11 @@
status = RtlConvertSidToUnicodeString(&scSid, pSid, TRUE);
if ( ! NT_SUCCESS(status) )
{
- printf("RtlConvertSidToUnicodeString(): status = 0x%08x\n", status);
+ printf("RtlConvertSidToUnicodeString(): status = 0x%08lx\n", status);
break;
}
- printf("%d.) %S %wZ 0x%08x\n", i, wszType, &scSid, pAce->AccessMask);
+ printf("%lu.) %S %.*ls 0x%08lx\n", i, wszType, scSid.Length, scSid.Buffer, pAce->AccessMask);
LocalFree(scSid.Buffer);
}
}
@@ -291,7 +292,7 @@
p = (PBYTE) malloc(n);
if ( ! GetTokenInformation(hToken, tic, p, n, &n) )
{
- printf("GetFromToken() failed for TOKEN_INFORMATION_CLASS(%d): %d\n", tic, GetLastError());
+ printf("GetFromToken() failed for TOKEN_INFORMATION_CLASS(%d): %lu\n", tic, GetLastError());
free(p);
return 0;
}
@@ -327,7 +328,7 @@
EnablePrivilege(LPWSTR wszName)
{
HANDLE hToken;
- TOKEN_PRIVILEGES priv = {1, {0, 0, SE_PRIVILEGE_ENABLED}};
+ TOKEN_PRIVILEGES priv = {1, {{{0, 0}, SE_PRIVILEGE_ENABLED}}};
BOOL bResult;
LookupPrivilegeValue(0, wszName, &priv.Privileges[0].Luid);
@@ -345,10 +346,10 @@
NTSTATUS
CreateInitialSystemToken(HANDLE* phSystemToken)
{
- static SID sidSystem = { 1, 1, SECURITY_NT_AUTHORITY, SECURITY_LOCAL_SYSTEM_RID };
- static SID sidEveryone = { 1, 1, SECURITY_WORLD_SID_AUTHORITY, SECURITY_WORLD_RID };
- static SID sidAuthenticatedUser = { 1, 1, SECURITY_NT_AUTHORITY, SECURITY_AUTHENTICATED_USER_RID };
- static SID_2 sidAdministrators = { 1, 2, SECURITY_NT_AUTHORITY, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS };
+ static SID sidSystem = { 1, 1, {SECURITY_NT_AUTHORITY}, {SECURITY_LOCAL_SYSTEM_RID} };
+ static SID sidEveryone = { 1, 1, {SECURITY_WORLD_SID_AUTHORITY}, {SECURITY_WORLD_RID} };
+ static SID sidAuthenticatedUser = { 1, 1, {SECURITY_NT_AUTHORITY}, {SECURITY_AUTHENTICATED_USER_RID} };
+ static SID_2 sidAdministrators = { 1, 2, {SECURITY_NT_AUTHORITY}, {SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS} };
static const int nGroupCount = 3;
NTSTATUS status;
@@ -444,15 +445,15 @@
status = RtlCreateAcl(tkDefaultDacl.DefaultDacl, uSize, ACL_REVISION);
if ( ! NT_SUCCESS(status) )
- printf("RtlCreateAcl() failed: 0x%08x\n", status);
+ printf("RtlCreateAcl() failed: 0x%08lx\n", status);
status = RtlAddAccessAllowedAce(tkDefaultDacl.DefaultDacl, ACL_REVISION, GENERIC_ALL, &sidSystem);
if ( ! NT_SUCCESS(status) )
- printf("RtlAddAccessAllowedAce() failed: 0x%08x\n", status);
+ printf("RtlAddAccessAllowedAce() failed: 0x%08lx\n", status);
status = RtlAddAccessAllowedAce(tkDefaultDacl.DefaultDacl, ACL_REVISION, GENERIC_READ|GENERIC_EXECUTE|READ_CONTROL, (PSID) &sidAdministrators);
if ( ! NT_SUCCESS(status) )
- printf("RtlAddAccessAllowedAce() failed: 0x%08x\n", status);
+ printf("RtlAddAccessAllowedAce() failed: 0x%08lx\n", status);
printf("Parameters being passed into ZwCreateToken:\n\n");
DisplayTokenSids(&tkUser, ptkGroups, &tkDefaultOwner, &tkPrimaryGroup);
@@ -483,7 +484,7 @@
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int
-main(int argc, char** argv[])
+main(int argc, char* argv[])
{
NTSTATUS Status;
HANDLE hSystemToken;
@@ -500,7 +501,7 @@
}
else
{
- printf("ZwOpenProcessToken() failed: 0x%08x\n", Status);
+ printf("ZwOpenProcessToken() failed: 0x%08lx\n", Status);
}
//#define ENABLE_PRIVILEGE
@@ -512,13 +513,13 @@
Status = CreateInitialSystemToken(&hSystemToken);
if ( NT_SUCCESS(Status) )
{
- printf("System Token: 0x%08x\n", hSystemToken);
+ printf("System Token: 0x%08lx\n", (DWORD)hSystemToken);
DisplayToken(hSystemToken);
CloseHandle(hSystemToken);
}
else
{
- printf("CreateInitialSystemToken() return: 0x%08x\n", Status);
+ printf("CreateInitialSystemToken() return: 0x%08lx\n", Status);
}
printf("press return");
Index: apps/tests/txtscale/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/txtscale/Makefile,v
retrieving revision 1.3
diff -u -w -r1.3 Makefile
--- apps/tests/txtscale/Makefile 23 Aug 2003 06:43:54 -0000 1.3
+++ apps/tests/txtscale/Makefile 13 Nov 2003 02:24:57 -0000
@@ -9,9 +9,9 @@
TARGET_NORC = yes
-TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
+TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -Wall -Werror
-TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
+TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 -Wall -Werror
TARGET_SDKLIBS = \
kernel32.a \
Index: apps/tests/vmtest/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/vmtest/Makefile,v
retrieving revision 1.6
diff -u -w -r1.6 Makefile
--- apps/tests/vmtest/Makefile 2 Jun 2002 19:25:01 -0000 1.6
+++ apps/tests/vmtest/Makefile 13 Nov 2003 02:24:57 -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/vmtest/vmtest.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/vmtest/vmtest.c,v
retrieving revision 1.2
diff -u -w -r1.2 vmtest.c
--- apps/tests/vmtest/vmtest.c 13 Mar 2001 16:25:51 -0000 1.2
+++ apps/tests/vmtest/vmtest.c 13 Nov 2003 02:24:57 -0000
@@ -50,5 +50,6 @@
{
printf("VirtualAlloc failed 5\n");
}
+ return 0;
}
Index: apps/tests/winhello/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/winhello/makefile,v
retrieving revision 1.4
diff -u -w -r1.4 makefile
--- apps/tests/winhello/makefile 30 Jul 2003 14:08:16 -0000 1.4
+++ apps/tests/winhello/makefile 13 Nov 2003 02:24:57 -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/winhello/winhello.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/winhello/winhello.c,v
retrieving revision 1.11
diff -u -w -r1.11 winhello.c
--- apps/tests/winhello/winhello.c 20 Sep 2003 14:44:35 -0000 1.11
+++ apps/tests/winhello/winhello.c 13 Nov 2003 02:24:58 -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);
}
@@ -99,8 +100,8 @@
TextOut(hDC, 10, 10, "Hello World from ReactOS!", strlen("Hello World from ReactOS!"));
GetClientRect(hWnd, &clr);
GetWindowRect(hWnd, &wir);
- sprintf(spr, "%d,%d,%d,%d ", clr.left, clr.top, clr.right, clr.bottom);
- sprintf(sir, "%d,%d,%d,%d ", wir.left, wir.top, wir.right, wir.bottom);
+ sprintf(spr, "%lu,%lu,%lu,%lu ", clr.left, clr.top, clr.right, clr.bottom);
+ sprintf(sir, "%lu,%lu,%lu,%lu ", wir.left, wir.top, wir.right, wir.bottom);
TextOut(hDC, 10, 30, spr, 20);
TextOut(hDC, 10, 50, sir, 20);
ReleaseDC ( hWnd, hDC );
Index: apps/tests/winhello2/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/winhello2/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/tests/winhello2/makefile 24 Sep 2003 16:11:05 -0000 1.1
+++ apps/tests/winhello2/makefile 13 Nov 2003 02:24:58 -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/winhello2/winhello2.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/winhello2/winhello2.c,v
retrieving revision 1.1
diff -u -w -r1.1 winhello2.c
--- apps/tests/winhello2/winhello2.c 24 Sep 2003 16:11:05 -0000 1.1
+++ apps/tests/winhello2/winhello2.c 13 Nov 2003 02:25:01 -0000
@@ -31,7 +31,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);
}
@@ -49,7 +49,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);
}
@@ -379,7 +379,6 @@
case WM_HSCROLL:
{
int nPos;
- int Pos;
int temp;
RECT Rect;
int nScrollCode;
@@ -456,7 +455,6 @@
case WM_VSCROLL:
{
int nPos;
- int Pos;
int temp;
RECT Rect;
int nScrollCode;
@@ -569,8 +567,8 @@
TextOut(hDC, 10, 10, "Hello World from ReactOS!", strlen("Hello World from ReactOS!"));
GetClientRect(hWnd, &clr);
GetWindowRect(hWnd, &wir);
- sprintf(spr, "%d,%d,%d,%d ", clr.left, clr.top, clr.right, clr.bottom);
- sprintf(sir, "%d,%d,%d,%d ", wir.left, wir.top, wir.right, wir.bottom);
+ sprintf(spr, "%lu,%lu,%lu,%lu ", clr.left, clr.top, clr.right, clr.bottom);
+ sprintf(sir, "%lu,%lu,%lu,%lu ", wir.left, wir.top, wir.right, wir.bottom);
TextOut(hDC, 10, 30, spr, 20);
TextOut(hDC, 10, 50, sir, 20);
ReleaseDC ( hWnd, hDC );
Index: apps/tests/wm_erasebkgnd/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/wm_erasebkgnd/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/wm_erasebkgnd/makefile 23 Aug 2003 06:48:35 -0000 1.2
+++ apps/tests/wm_erasebkgnd/makefile 13 Nov 2003 02:25:02 -0000
@@ -9,9 +9,9 @@
TARGET_NORC = yes
-TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
-TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API
+TARGET_CPPFLAGS = -fexceptions -g -O0 -DWIN32 -D_DEBUG -D_WINDOWS -D_MBCS -W -D__USE_W32API -Wall -Werror
TARGET_SDKLIBS = \
kernel32.a \
Index: apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp,v
retrieving revision 1.1
diff -u -w -r1.1 wm_erasebkgnd.cpp
--- apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp 23 Aug 2003 06:48:35 -0000 1.1
+++ apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp 13 Nov 2003 02:25:03 -0000
@@ -28,6 +28,8 @@
HINSTANCE HInst;
+HINSTANCE HPrevInst;
+TCHAR *cmdline;
const char* WndClassName = "GMainWnd";
LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
LPARAM LParam);
@@ -37,6 +39,8 @@
LPTSTR lpCmdLine, int nCmdShow)
{
HInst = HInstance;
+ HPrevInst = HPrevInstance;
+ cmdline = lpCmdLine;
WNDCLASS wc;
memset(&wc, 0, sizeof(WNDCLASS));
Index: apps/tests/wm_paint/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/wm_paint/makefile,v
retrieving revision 1.2
diff -u -w -r1.2 makefile
--- apps/tests/wm_paint/makefile 26 Apr 2003 21:39:36 -0000 1.2
+++ apps/tests/wm_paint/makefile 13 Nov 2003 02:25:03 -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/wm_paint/wm_paint.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/tests/wm_paint/wm_paint.c,v
retrieving revision 1.3
diff -u -w -r1.3 wm_paint.c
--- apps/tests/wm_paint/wm_paint.c 20 Sep 2003 14:44:35 -0000 1.3
+++ apps/tests/wm_paint/wm_paint.c 13 Nov 2003 02:25:03 -0000
@@ -13,6 +13,7 @@
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <windows.h>
+#include <string.h>
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Index: apps/testsets/loadlib/loadlib.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/testsets/loadlib/loadlib.c,v
retrieving revision 1.1
diff -u -w -r1.1 loadlib.c
--- apps/testsets/loadlib/loadlib.c 5 Jan 2003 14:17:42 -0000 1.1
+++ apps/testsets/loadlib/loadlib.c 13 Nov 2003 02:25:05 -0000
@@ -22,7 +22,8 @@
#include <windows.h>
#include "loadlib.h"
-
+#include <string.h>
+#include <wchar.h>
#define APP_VERSION 1
#define MAX_LIBS 25
@@ -151,7 +152,6 @@
{
char* libs[MAX_LIBS];
int lib_count = 0;
- int test_num = 0;
int result = 0;
int i = 0;
Index: apps/testsets/loadlib/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/testsets/loadlib/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/testsets/loadlib/makefile 5 Jan 2003 14:17:42 -0000 1.1
+++ apps/testsets/loadlib/makefile 13 Nov 2003 02:25:05 -0000
@@ -11,6 +11,8 @@
TARGET_NAME = loadlib
+TARGET_CFLAGS = -Wall -Werror
+
#TARGET_CFLAGS = -DDBG -DUNICODE -D_UNICODE
TARGET_SDKLIBS = kernel32.a ntdll.a
Index: apps/utils/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/Makefile,v
retrieving revision 1.6
diff -u -w -r1.6 Makefile
--- apps/utils/Makefile 7 Nov 2003 09:12:44 -0000 1.6
+++ apps/utils/Makefile 13 Nov 2003 02:25:06 -0000
@@ -13,7 +13,6 @@
UTIL_NET_APPS =
-
all: $(UTIL_APPS) $(UTIL_NET_APPS)
depends:
Index: apps/utils/cat/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/cat/makefile,v
retrieving revision 1.10
diff -u -w -r1.10 makefile
--- apps/utils/cat/makefile 7 Jun 2002 22:57:41 -0000 1.10
+++ apps/utils/cat/makefile 13 Nov 2003 02:25:06 -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/utils/consw/consw.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/consw/consw.c,v
retrieving revision 1.1
diff -u -w -r1.1 consw.c
--- apps/utils/consw/consw.c 29 Jul 2003 20:38:30 -0000 1.1
+++ apps/utils/consw/consw.c 13 Nov 2003 02:25:06 -0000
@@ -23,6 +23,7 @@
0,
!strcmp( argv[1], "hw" ) );
}
+ return 0;
}
Index: apps/utils/consw/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/consw/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/utils/consw/makefile 29 Jul 2003 20:38:30 -0000 1.1
+++ apps/utils/consw/makefile 13 Nov 2003 02:25:06 -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/utils/partinfo/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/partinfo/makefile,v
retrieving revision 1.4
diff -u -w -r1.4 makefile
--- apps/utils/partinfo/makefile 11 Nov 2003 17:01:22 -0000 1.4
+++ apps/utils/partinfo/makefile 13 Nov 2003 02:25:07 -0000
@@ -10,7 +10,7 @@
TARGET_NAME = partinfo
-#TARGET_CFLAGS = -Wall -Werror
+TARGET_CFLAGS = -Wall -Werror
TARGET_SDKLIBS = ntdll.a kernel32.a
Index: apps/utils/partinfo/partinfo.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/partinfo/partinfo.c,v
retrieving revision 1.5
diff -u -w -r1.5 partinfo.c
--- apps/utils/partinfo/partinfo.c 11 Nov 2003 17:01:22 -0000 1.5
+++ apps/utils/partinfo/partinfo.c 13 Nov 2003 02:25:08 -0000
@@ -150,7 +150,7 @@
HexDump((char*)&DiskGeometry, dwRead);
#endif
printf("Drive number: %lu\n", ulDrive);
- printf("Cylinders: %I64u\nMediaType: %x\nTracksPerCylinder: %lu\n"
+ printf("Cylinders: %llu\nMediaType: %x\nTracksPerCylinder: %lu\n"
"SectorsPerTrack: %lu\nBytesPerSector: %lu\n\n",
DiskGeometry.Cylinders.QuadPart,
DiskGeometry.MediaType,
@@ -198,7 +198,7 @@
for (i = 0; i < LayoutBuffer->PartitionCount; i++)
{
- printf(" %ld: nr: %ld boot: %1x type: %x start: 0x%I64x count: 0x%I64x\n",
+ printf(" %ld: nr: %ld boot: %1x type: %x start: 0x%llx count: 0x%llx\n",
i,
LayoutBuffer->PartitionEntry[i].PartitionNumber,
LayoutBuffer->PartitionEntry[i].BootIndicator,
Index: apps/utils/sc/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/sc/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/utils/sc/makefile 26 Dec 2002 17:04:46 -0000 1.1
+++ apps/utils/sc/makefile 13 Nov 2003 02:25:09 -0000
@@ -11,7 +11,7 @@
TARGET_NAME = sc
-TARGET_CFLAGS = -DDBG
+TARGET_CFLAGS = -DDBG -Werror -Wall
TARGET_SDKLIBS = kernel32.a ntdll.a advapi32.a
Index: apps/utils/stats/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/stats/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- apps/utils/stats/Makefile 7 Jun 2002 22:58:37 -0000 1.2
+++ apps/utils/stats/Makefile 13 Nov 2003 02:25: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/utils/stats/stats.c
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/stats/stats.c,v
retrieving revision 1.2
diff -u -w -r1.2 stats.c
--- apps/utils/stats/stats.c 23 Aug 2003 16:33:04 -0000 1.2
+++ apps/utils/stats/stats.c 13 Nov 2003 02:25:11 -0000
@@ -9,7 +9,7 @@
*/
#include <windows.h>
#include <tchar.h>
-
+#include <stdio.h>
typedef struct _EXTENSION_INFO
{
@@ -290,9 +290,9 @@
_tprintf (_T("\n"));
_tprintf (_T("File extension : %s\n"), Info->ExtName);
_tprintf (_T("File ext. description : %s\n"), Info->Description);
- _tprintf (_T("Number of files : %d\n"), Info->FileCount);
- _tprintf (_T("Number of lines : %d\n"), Info->LineCount);
- _tprintf (_T("Average no. lines/file : %d\n"), AvgLF);
+ _tprintf (_T("Number of files : %lu\n"), Info->FileCount);
+ _tprintf (_T("Number of lines : %lu\n"), Info->LineCount);
+ _tprintf (_T("Average no. lines/file : %lu\n"), AvgLF);
TotalFileCount += Info->FileCount;
TotalLineCount += Info->LineCount;
@@ -303,9 +303,9 @@
TotalAvgLF = TotalLineCount / TotalFileCount;
_tprintf (_T("\n"));
- _tprintf (_T("Total number of files : %d\n"), TotalFileCount);
- _tprintf (_T("Total number of lines : %d\n"), TotalLineCount);
- _tprintf (_T("Average no. lines/file : %d\n"), TotalAvgLF);
+ _tprintf (_T("Total number of files : %lu\n"), TotalFileCount);
+ _tprintf (_T("Total number of lines : %lu\n"), TotalLineCount);
+ _tprintf (_T("Average no. lines/file : %lu\n"), TotalAvgLF);
}
Index: apps/utils/tickcount/makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/apps/utils/tickcount/makefile,v
retrieving revision 1.1
diff -u -w -r1.1 makefile
--- apps/utils/tickcount/makefile 9 Feb 2003 21:17:21 -0000 1.1
+++ apps/utils/tickcount/makefile 13 Nov 2003 02:25:11 -0000
@@ -12,6 +12,8 @@
TARGET_OBJECTS = tickcount.o
+TARGET_CFLAGS = -Wall -Werror
+
include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
More information about the Ros-kernel
mailing list