Patch by Jonathon Wilson:
authorThomas Bluemel <thomas@reactsoft.com>
Fri, 14 Nov 2003 17:13:36 +0000 (17:13 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Fri, 14 Nov 2003 17:13:36 +0000 (17:13 +0000)
fix most of ReactOS to build with -Wall -Werror by default

svn path=/trunk/; revision=6645

301 files changed:
reactos/apps/tests/SampleWindow/makefile
reactos/apps/tests/alive/Makefile
reactos/apps/tests/apc/makefile
reactos/apps/tests/apc2/apc2.c
reactos/apps/tests/apc2/makefile
reactos/apps/tests/args/makefile
reactos/apps/tests/atomtest/makefile
reactos/apps/tests/bench/bench-thread.c
reactos/apps/tests/bench/makefile
reactos/apps/tests/bitblt/bitblt.c
reactos/apps/tests/bitblt/makefile
reactos/apps/tests/button/Makefile
reactos/apps/tests/button/buttontst.c
reactos/apps/tests/button2/Makefile
reactos/apps/tests/button2/buttontst2.c
reactos/apps/tests/capclock/Makefile
reactos/apps/tests/capclock/capclock.c
reactos/apps/tests/carets/carets.c
reactos/apps/tests/carets/makefile
reactos/apps/tests/cliarea/cliarea.c
reactos/apps/tests/cliarea/makefile
reactos/apps/tests/combo/combotst.c
reactos/apps/tests/combo/makefile
reactos/apps/tests/consume/Makefile
reactos/apps/tests/copymove/Makefile
reactos/apps/tests/copymove/copymove.c
reactos/apps/tests/count/Makefile
reactos/apps/tests/count/count.c
reactos/apps/tests/dibtest/dibtest.c
reactos/apps/tests/dibtest/makefile
reactos/apps/tests/dump_shared_data/dump_shared_data.c
reactos/apps/tests/dump_shared_data/makefile
reactos/apps/tests/edit/edittest.c
reactos/apps/tests/edit/makefile
reactos/apps/tests/enumwnd/enumwnd.c
reactos/apps/tests/enumwnd/makefile
reactos/apps/tests/event/makefile
reactos/apps/tests/eventpair/eventpair.c
reactos/apps/tests/eventpair/makefile
reactos/apps/tests/file/Makefile
reactos/apps/tests/file/file.c
reactos/apps/tests/gditest/gditest.c
reactos/apps/tests/gditest/makefile
reactos/apps/tests/global_mem/Makefile
reactos/apps/tests/global_mem/global_mem.c
reactos/apps/tests/hello/makefile
reactos/apps/tests/hivetest/hivetest.c
reactos/apps/tests/hivetest/makefile
reactos/apps/tests/hotkey/hotkey.c
reactos/apps/tests/hotkey/makefile
reactos/apps/tests/icontest/icontest.c
reactos/apps/tests/icontest/makefile
reactos/apps/tests/isotest/isotest.c
reactos/apps/tests/isotest/makefile
reactos/apps/tests/lineclip/lineclip.c
reactos/apps/tests/lineclip/makefile
reactos/apps/tests/linetest/linetest.c
reactos/apps/tests/linetest/makefile
reactos/apps/tests/lock/Makefile
reactos/apps/tests/lock/lock.c
reactos/apps/tests/lpc/makefile
reactos/apps/tests/map_dup_inherit/makefile
reactos/apps/tests/map_dup_inherit/map_dup_inherit.c
reactos/apps/tests/messagebox/makefile
reactos/apps/tests/mktime/makefile
reactos/apps/tests/mktime/mktime.c
reactos/apps/tests/mstest/Makefile
reactos/apps/tests/multiwin/makefile
reactos/apps/tests/multiwin/multiwin.c
reactos/apps/tests/mutex/makefile
reactos/apps/tests/nptest/Makefile
reactos/apps/tests/p_dup_handle/makefile
reactos/apps/tests/p_dup_handle/p_dup_handle.c
reactos/apps/tests/palbitblt/makefile
reactos/apps/tests/patblt/makefile
reactos/apps/tests/pipe/Makefile
reactos/apps/tests/pipe/pipe.c
reactos/apps/tests/primitives/Makefile
reactos/apps/tests/pteb/Makefile
reactos/apps/tests/pteb/pteb.c
reactos/apps/tests/regdump/makefile
reactos/apps/tests/regtest/makefile
reactos/apps/tests/regtest/regtest.c
reactos/apps/tests/sectest/Makefile
reactos/apps/tests/sectest/sectest.c
reactos/apps/tests/sertest/makefile
reactos/apps/tests/sertest/sertest.c
reactos/apps/tests/shaptest/makefile
reactos/apps/tests/shm/makefile
reactos/apps/tests/statst/Makefile
reactos/apps/tests/statst2/Makefile
reactos/apps/tests/stretchblt/makefile
reactos/apps/tests/stretchblt/stretchblt.cpp
reactos/apps/tests/subclass/makefile
reactos/apps/tests/suspend/Makefile
reactos/apps/tests/suspend/suspend.c
reactos/apps/tests/tcpsvr/makefile
reactos/apps/tests/tcpsvr/tcpsvr.c
reactos/apps/tests/terminate/Makefile
reactos/apps/tests/terminate/terminate.c
reactos/apps/tests/tests/GetSysMetrics/Makefile
reactos/apps/tests/tests/GetSystemInfo/Makefile
reactos/apps/tests/tests/Parent_Child/Makefile
reactos/apps/tests/tests/guitest/Makefile
reactos/apps/tests/tests/hello/Makefile
reactos/apps/tests/tests/new/Makefile
reactos/apps/tests/tests/rolex/Makefile
reactos/apps/tests/tests/volinfo/Makefile
reactos/apps/tests/thread/makefile
reactos/apps/tests/thread/thread.c
reactos/apps/tests/thread_msg/makefile
reactos/apps/tests/thread_msg/thread_msg.c
reactos/apps/tests/threadwait/makefile
reactos/apps/tests/threadwait/threadwait.c
reactos/apps/tests/tokentest/makefile
reactos/apps/tests/tokentest/tokentest.c
reactos/apps/tests/txtscale/Makefile
reactos/apps/tests/vmtest/Makefile
reactos/apps/tests/vmtest/vmtest.c
reactos/apps/tests/winhello/makefile
reactos/apps/tests/winhello/winhello.c
reactos/apps/tests/winhello2/makefile
reactos/apps/tests/winhello2/winhello2.c
reactos/apps/tests/wm_erasebkgnd/makefile
reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp
reactos/apps/tests/wm_paint/makefile
reactos/apps/tests/wm_paint/wm_paint.c
reactos/apps/testsets/loadlib/loadlib.c
reactos/apps/testsets/loadlib/makefile
reactos/apps/utils/cat/makefile
reactos/apps/utils/consw/consw.c
reactos/apps/utils/consw/makefile
reactos/apps/utils/partinfo/makefile
reactos/apps/utils/sc/makefile
reactos/apps/utils/stats/Makefile
reactos/apps/utils/stats/stats.c
reactos/apps/utils/tickcount/makefile
reactos/drivers/bus/acpi/events/evxfregn.c
reactos/drivers/bus/acpi/ospm/acpienum.c
reactos/drivers/bus/acpi/ospm/fdo.c
reactos/drivers/bus/acpi/ospm/osl.c
reactos/drivers/bus/acpi/ospm/pdo.c
reactos/drivers/bus/isapnp/isapnp.c
reactos/drivers/bus/isapnp/makefile
reactos/drivers/bus/pci/makefile
reactos/drivers/bus/pci/pci.c
reactos/drivers/bus/pci/pci.h
reactos/drivers/dd/bootvid/Makefile
reactos/drivers/dd/bootvid/bootvid.c
reactos/drivers/dd/debugout/makefile
reactos/drivers/dd/ide/makefile
reactos/drivers/dd/serial/makefile
reactos/drivers/dd/serial/serial.c
reactos/drivers/dd/vga/display/main/enable.c
reactos/drivers/dd/vga/display/makefile
reactos/drivers/dd/vga/display/objects/bitblt.c
reactos/drivers/dd/vga/display/objects/lineto.c
reactos/drivers/dd/vga/display/objects/paint.c
reactos/drivers/dd/vga/display/objects/pointer.c
reactos/drivers/dd/vga/display/objects/screen.c
reactos/drivers/dd/vga/display/vgaddi.h
reactos/drivers/dd/vga/display/vgavideo/vgavideo.c
reactos/drivers/dd/vga/display/vgavideo/vgavideo.h
reactos/drivers/dd/vga/miniport/initvga.c
reactos/drivers/dd/vga/miniport/makefile
reactos/drivers/dd/vga/miniport/vgamp.c
reactos/drivers/input/keyboard/keyboard.c
reactos/drivers/input/keyboard/makefile
reactos/drivers/input/mouclass/makefile
reactos/drivers/input/mouclass/mouclass.c
reactos/drivers/input/psaux/controller.c
reactos/drivers/input/psaux/controller.h
reactos/drivers/input/psaux/logips2pp.c
reactos/drivers/input/psaux/makefile
reactos/drivers/input/psaux/mouse.c
reactos/drivers/input/psaux/mouse.h
reactos/drivers/input/psaux/psaux.c
reactos/drivers/input/sermouse/makefile
reactos/drivers/lib/bzip2/Makefile
reactos/drivers/net/afd/afd/dispatch.c
reactos/drivers/net/afd/afd/event.c
reactos/drivers/net/afd/afd/opnclose.c
reactos/drivers/net/afd/afd/rdwr.c
reactos/drivers/net/afd/afd/routines.c
reactos/drivers/net/afd/afd/tdi.c
reactos/drivers/net/afd/makefile
reactos/drivers/net/dd/ne2000/Makefile
reactos/drivers/net/ndis/Makefile
reactos/drivers/net/npf/Makefile
reactos/drivers/net/npf/dump.c
reactos/drivers/net/npf/jitter.h
reactos/drivers/net/npf/openclos.c
reactos/drivers/net/npf/packet.c
reactos/drivers/net/npf/read.c
reactos/drivers/net/npf/tcp_session.c
reactos/drivers/net/npf/time_calls.c
reactos/drivers/net/npf/write.c
reactos/drivers/net/tdi/Makefile
reactos/drivers/net/tdi/tdi/dereg.c
reactos/drivers/net/wshtcpip/makefile
reactos/hal/hal/Makefile
reactos/iface/addsys/makefile
reactos/iface/native/makefile
reactos/include/msvcrt/wchar.h
reactos/lib/crtdll/except/abnorter.c
reactos/lib/crtdll/makefile
reactos/lib/crtdll/process/spawnve.c
reactos/lib/crtdll/signal/xcptfil.c
reactos/lib/crtdll/sys_stat/stat.c
reactos/lib/crtdll/sys_stat/systime.c
reactos/lib/d3d8thk/Makefile
reactos/lib/iphlpapi/iphlpapi.c
reactos/lib/iphlpapi/makefile
reactos/lib/msimg32/Makefile
reactos/lib/msvcrt/Makefile
reactos/lib/msvcrt/except/abnorter.c
reactos/lib/msvcrt/except/unwind.c
reactos/lib/msvcrt/except/xcptfil.c
reactos/lib/msvcrt/io/write.c
reactos/lib/msvcrt/mbstring/mbsrev.c
reactos/lib/msvcrt/misc/cpp.c
reactos/lib/msvcrt/misc/environ.c
reactos/lib/msvcrt/misc/initterm.c
reactos/lib/msvcrt/process/thread.c
reactos/lib/msvcrt/process/threadx.c
reactos/lib/msvcrt/stdio/vfprintf.c
reactos/lib/msvcrt/stdio/vfwprint.c
reactos/lib/msvcrt/stdlib/mbstowcs.c
reactos/lib/msvcrt/stdlib/strtol.c
reactos/lib/msvcrt/stdlib/strtoul.c
reactos/lib/msvcrt/stdlib/wcstol.c
reactos/lib/msvcrt/stdlib/wcstomb.c
reactos/lib/msvcrt/stdlib/wcstombs.c
reactos/lib/msvcrt/stdlib/wcstoul.c
reactos/lib/packet/Packet32.c
reactos/lib/packet/makefile
reactos/lib/packet/trace.c
reactos/lib/richedit/Makefile
reactos/lib/winedbgc/Makefile
reactos/lib/winedbgc/debug.c
reactos/lib/winedbgc/trace.c
reactos/lib/winedbgc/trace.h
reactos/lib/winedbgc/winedbgc.c
reactos/lib/winedbgc/winedbgc.dll.dbg.c
reactos/ntoskrnl/mm/freelist.c
reactos/services/eventlog/eventlog.c
reactos/services/eventlog/logport.c
reactos/services/eventlog/makefile
reactos/services/rpcss/makefile
reactos/services/rpcss/rpcss.c
reactos/services/rpcss/rpcss.h
reactos/subsys/ntvdm/makefile
reactos/subsys/ntvdm/ntvdm.c
reactos/subsys/smss/init.c
reactos/subsys/smss/makefile
reactos/subsys/system/autochk/makefile
reactos/subsys/system/format/format.c
reactos/subsys/system/format/makefile
reactos/subsys/system/gstart/Makefile
reactos/subsys/system/services/database.c
reactos/subsys/system/services/makefile
reactos/subsys/system/setup/makefile
reactos/subsys/system/usetup/cabinet.c
reactos/subsys/system/usetup/console.c
reactos/subsys/system/usetup/console.h
reactos/subsys/system/usetup/infcache.c
reactos/subsys/system/usetup/inicache.c
reactos/subsys/system/usetup/makefile
reactos/subsys/system/usetup/partlist.c
reactos/subsys/system/usetup/progress.c
reactos/subsys/system/usetup/registry.c
reactos/subsys/system/usetup/usetup.c
reactos/subsys/system/welcome/Makefile
reactos/subsys/system/winlogon/makefile
reactos/subsys/system/winlogon/winlogon.c
reactos/tools/Makefile
reactos/tools/buildno.c
reactos/tools/cabman/cabinet.cxx
reactos/tools/cabman/cabinet.h
reactos/tools/cabman/dfp.cxx
reactos/tools/cabman/main.cxx
reactos/tools/cabman/makefile
reactos/tools/cabman/makefile.win32
reactos/tools/cdmake/Makefile
reactos/tools/create_nls/Makefile
reactos/tools/mkhive/Makefile
reactos/tools/mkhive/binhive.c
reactos/tools/mkhive/infcache.c
reactos/tools/mkhive/mkhive.c
reactos/tools/mkhive/reginf.c
reactos/tools/mkhive/registry.c
reactos/tools/rcopy.c
reactos/tools/regtests.c
reactos/tools/rgenstat/Makefile
reactos/tools/rgenstat/rgenstat.c
reactos/tools/rline.c
reactos/tools/rmkdir.c
reactos/tools/rsym.c
reactos/tools/rtouch.c
reactos/tools/wmc/getopt.c
reactos/tools/wmc/makefile

index 7b454e5..437970f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/07/24 15:51:58 rcampbell Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:14 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 705ba09..4681416 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.6 2002/06/02 19:24:57 chorns Exp $
+# $Id: Makefile,v 1.7 2003/11/14 17:13:14 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index fadc439..19cf9c3 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.9 2002/06/02 19:24:57 chorns Exp $
+# $Id: makefile,v 1.10 2003/11/14 17:13:14 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index c6529fa..739fc18 100644 (file)
@@ -7,7 +7,7 @@ VOID CALLBACK TimerApcProc(
   DWORD dwTimerLowValue,
   DWORD dwTimerHighValue ) 
 {
-  printf("APC Callback %i\n", *(PDWORD)lpArg);
+  printf("APC Callback %lu\n", *(PDWORD)lpArg);
 }
 
 
@@ -49,4 +49,5 @@ int main()
 
   CloseHandle( hTimer );
   return 0;
-}
\ No newline at end of file
+}
+
index c48f700..50ea560 100644 (file)
@@ -12,6 +12,8 @@ TARGET_NAME = apc2
 
 TARGET_SDKLIBS = ntdll.a kernel32.a
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
index fc2f3a8..d0cb815 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.15 2002/06/02 19:24:57 chorns Exp $
+# $Id: makefile,v 1.16 2003/11/14 17:13:14 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = args
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 5099d72..1fdf6ea 100644 (file)
@@ -1,5 +1,4 @@
-# $Id: makefile,v 1.5 2002/06/02 19:24:57 chorns Exp $
-
+# $Id: makefile,v 1.6 2003/11/14 17:13:15 weiden Exp $
 PATH_TO_TOP = ../../..
 
 TARGET_NORC = yes
@@ -14,6 +13,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index ae17b2b..6648a25 100644 (file)
@@ -24,7 +24,6 @@ thread_main2(LPVOID param)
 
 int main (void)
 {
-   HANDLE hThread;
    DWORD i=0;
    DWORD id;
 
index a9424ed..f16c9c7 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.10 2002/06/02 19:24:57 chorns Exp $
+# $Id: makefile,v 1.11 2003/11/14 17:13:15 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 704e8fa..b538f7c 100644 (file)
@@ -12,6 +12,7 @@
 
 
 #include <windows.h>
+#include <string.h>
 
 HINSTANCE HInst;
 const char* WndClassName = "GMainWnd";
index bc1acb1..a27f767 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index bdfc46f..44e44d4 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = buttontst.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 58ea4f6..c12887b 100644 (file)
@@ -15,7 +15,6 @@ HINSTANCE AppInstance = NULL;
 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 6f5b5b2..edac2e4 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = buttontst2.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 48bb5a2..b16c905 100644 (file)
@@ -27,7 +27,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 0e849b8..d4a9d4c 100644 (file)
@@ -11,6 +11,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = capclock.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 629e231..077ce09 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: capclock.c,v 1.2 2003/09/24 20:05:29 weiden Exp $
+/* $Id: capclock.c,v 1.3 2003/11/14 17:13:16 weiden Exp $
  *
  * DESCRIPTION: Simple Win32 Caption Clock
  * PROJECT    : ReactOS (test applications)
@@ -7,6 +7,7 @@
  * LICENSE    : GNU GPL v2.0
  */
 #include <windows.h>
+#include <string.h>
 
 UINT Timer = 1;
 
index 3c71e5c..4900781 100644 (file)
@@ -34,7 +34,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 a5f1c33..8bed039 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/10/15 18:28:54 weiden Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f74f7eb..d109231 100644 (file)
@@ -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 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 @@ WinMain(HINSTANCE hInstance,
 
 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 b8cce1a..3a6cd07 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/10/04 12:14:37 weiden Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index b8610d9..f99fc87 100644 (file)
@@ -73,7 +73,7 @@ char AddString[] = "string added";
 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 @@ struct
     }
 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 @@ Msg[] =
         * 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 @@ struct
     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 195251f..441f732 100644 (file)
@@ -15,6 +15,9 @@ TARGET_OBJECTS = \
        combotst.o \
        utils.o
 
+TARGET_CFLAGS = -Wall -Werror
+
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 45cf5cd..3ea20d7 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.7 2002/06/02 19:24:57 chorns Exp $
+# $Id: Makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = consume
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 41c8ba2..5bd5b47 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2002/12/27 23:54:33 gvg Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = copymove
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 81c4a2e..f938368 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <tchar.h>
 #include <windows.h>
 
@@ -54,20 +55,20 @@ CreateTestFile(LPCTSTR filename, DWORD attributes)
                          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 @@ static void
 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 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
                          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 @@ CheckTestFile(LPCTSTR filename, DWORD attributes)
        
        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 @@ main(int argc, char *argv[])
        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 @@ main(int argc, char *argv[])
                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 @@ main(int argc, char *argv[])
                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 @@ main(int argc, char *argv[])
        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 @@ main(int argc, char *argv[])
        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 @@ main(int argc, char *argv[])
        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 @@ main(int argc, char *argv[])
                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 @@ main(int argc, char *argv[])
        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 @@ main(int argc, char *argv[])
                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 @@ main(int argc, char *argv[])
                        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 @@ main(int argc, char *argv[])
                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 f5dec84..ce36e61 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $
+# $Id: Makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 48715d9..f3db81b 100644 (file)
@@ -1,7 +1,7 @@
-/* $Id: count.c,v 1.1 2001/03/26 21:30:20 ea Exp $
+/* $Id: count.c,v 1.2 2003/11/14 17:13:16 weiden Exp $
  *
  */
-#include <stdlib.h>
+#include <stdio.h>
 
 int n = 0;
 
index 7888032..27ce809 100644 (file)
@@ -48,7 +48,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 cda8cea..cb38483 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.2 2003/03/04 10:09:00 gvg Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 0b4a9e8..6ae2aeb 100644 (file)
@@ -5,7 +5,7 @@ int main()
 {
   int i;
 
-  printf("TickCountLow: %x\n", 
+  printf("TickCountLow: %lx\n", 
         SharedUserData->TickCountLow);
   printf("Drives: ");
   for (i = 0; i < 26; i++)
@@ -48,4 +48,5 @@ int main()
        }
     }
   printf("\n\n");
+  return 0;
 }
index 1194666..022d247 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.6 2002/06/02 19:24:58 chorns Exp $
+# $Id: makefile,v 1.7 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = dump_shared_data
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 9a792eb..7234646 100644 (file)
@@ -62,6 +62,7 @@ char TextBuffer[BUFFERLEN]={'R','e','s','u','l','t',':',' '};
 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 @@ struct
 }
 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_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_GETSEL",EM_GETSEL,(WPARAM)&StartP,(LPARAM)&EndP,&HandlePrintReturnHex},
 
-     "EM_GETTHUMB",EM_GETTHUMB,0,0,&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
+       {"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}
      
 };
 
@@ -575,7 +576,6 @@ WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
      return DefWindowProc ( hwnd, msg, wParam, lParam );
 }
 
-
 HWND
 RegisterAndCreateWindow (HINSTANCE hInst,
                         const char* className,
index 04a3724..c327d11 100644 (file)
@@ -15,6 +15,8 @@ TARGET_OBJECTS = \
        edittest.o \
        utils.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 0857d1b..c5b60ef 100644 (file)
@@ -39,7 +39,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 fbacd2a..b289471 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/07/25 19:13:14 royce Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 220903c..a8a0277 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.7 2002/06/02 19:24:58 chorns Exp $
+# $Id: makefile,v 1.8 2003/11/14 17:13:16 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index c438421..f20a725 100644 (file)
@@ -20,18 +20,18 @@ HANDLE MakeEventPair()
 
        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 @@ int main(int ac, char **av)
        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 @@ int main(int ac, char **av)
                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 40c0394..2828459 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/09/10 06:12:21 vizzini Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 152b8ec..15dc875 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $
+# $Id: Makefile,v 1.9 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = file
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 27f716e..f803fb4 100644 (file)
@@ -23,7 +23,7 @@ int main( void )
    
    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 @@ int main( void )
    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 4a8cd1b..4b6888f 100644 (file)
@@ -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 @@ void DumpRgnData( HRGN hRgn )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 @@ void rgntest( void )
                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 04c9b7b..3502a25 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.8 2002/06/02 19:24:58 chorns Exp $
+# $Id: makefile,v 1.9 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 2bd3e13..14c5b5b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/10/13 15:05:59 weiden Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = global_mem
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index eb0a76a..b9cb714 100644 (file)
@@ -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_Result(TEST_STATUS status)
 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 @@ void OutputErrorCode()
 {
     char buffer[256];
 
-    sprintf(buffer,"GetLastError() returned %d", GetLastError());
+    sprintf(buffer,"GetLastError() returned %lu", GetLastError());
 
     OUTPUT_Line(buffer);
 }
@@ -260,7 +261,6 @@ TEST_STATUS TestGlobalLockNUnlock(UINT allocFlags)
 {
     HGLOBAL     hMem      = 0;
     LPVOID      pMem      = 0;
-    LONG        errorCode = 0;
     TEST_STATUS subtest   = SKIPPED;
     TEST_STATUS result    = FAILED;
     
@@ -627,7 +627,7 @@ TEST_STATUS TestGlobalFlagsMoveable()
 
         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 @@ TEST_STATUS TestGlobalFlagsMoveable()
         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 @@ TEST_STATUS TestGlobalFlagsMoveable()
         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 @@ TEST_STATUS TestGlobalFlagsFixed()
         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 @@ TEST_STATUS TestGlobalFlagsFixed()
         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 3221d23..a7cb506 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.16 2002/06/02 19:24:59 chorns Exp $
+# $Id: makefile,v 1.17 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = hello
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 8ace59c..e941180 100644 (file)
@@ -113,7 +113,7 @@ void DeleteKeyTest(void)
 
 void EnumerateKeyTest(void)
 {
-  HKEY hKey = NULL, hKey1;
+  HKEY hKey = NULL;
   OBJECT_ATTRIBUTES ObjectAttributes;
   NTSTATUS Status;
   UNICODE_STRING KeyName;
@@ -304,7 +304,6 @@ void DeleteValueTest(void)
 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 @@ void test1(void)
  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 test1(void)
 
 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 test4(void)
 
 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 @@ void test6(void)
   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 80e2a63..a28e17f 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: makefile,v 1.1 2003/02/09 18:26:36 ekohl Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index ba805b7..63c1d92 100644 (file)
@@ -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 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
        PAINTSTRUCT ps;
        HDC hDC;
-       RECT clr, wir;
-        char spr[100], sir[100];
 
        switch(msg)
        {
index 60fed36..2199eba 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/11/11 22:17:18 weiden Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 52924fd..e93adcf 100644 (file)
@@ -1,5 +1,7 @@
 #include <windows.h>
 #include "resource.h"
+#include <string.h>
+#include <stdio.h>
 
 #ifndef GetCursorInfo
   #define _GetCursorInfo
@@ -100,8 +102,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
     HDC hMemDC;
     CURSORINFO cursorinfo;
     ICONINFO iconinfo;
-    HBITMAP hMaskBitmap;
-    HBITMAP hColorBitmap;  
     BITMAP bmp;
     RECT rc;
     CHAR str[20];
@@ -162,7 +162,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
           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 de02a8a..39dd5ce 100644 (file)
@@ -12,6 +12,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 684cc33..bfba7f9 100644 (file)
@@ -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 @@ int main (int argc, char *argv[])
 {
   HANDLE hDisk;
   DWORD dwRead;
-  DWORD i;
   char *Buffer;
   CHAR Filename[80];
   LARGE_INTEGER FilePosition;
index 2a9a155..6a8be72 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.2 2002/06/02 19:24:59 chorns Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -16,6 +16,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index e1e862e..3fba19c 100644 (file)
@@ -25,7 +25,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
        PAINTSTRUCT ps;
        HDC hDC;
-       RECT clr, wir;
+       RECT clr;
        HRGN ClipRgn, ExcludeRgn;
-        char spr[100], sir[100];
        RECT Rect;
 
        switch(msg)
index ec106b8..1be4525 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/07/14 09:47:47 gvg Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 172839d..f6da86d 100644 (file)
@@ -27,7 +27,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
   PAINTSTRUCT ps;
   HDC hDC;
   RECT clr;
-  HBRUSH hbr, hbrold;
+  HBRUSH hbr;
   
   switch(msg)
   {
index f6c0c10..1f72721 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/08/08 21:53:04 royce Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f7129b5..12880ee 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/01/25 15:46:52 hbirr Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index cbafdb5..8d85c84 100644 (file)
@@ -15,7 +15,7 @@ BOOL Slock(DWORD start,DWORD len)
 
 
   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 @@ BOOL Xlock(DWORD start,DWORD len)
 
   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 @@ BOOL unlock(DWORD start,DWORD len)
   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 6259c92..f698117 100644 (file)
@@ -10,7 +10,7 @@ CLT_OBJECTS= lpcclt.o
 
 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 c7d945a..e93605e 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/10/31 20:26:14 arty Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index ab112c8..2abd2ca 100644 (file)
@@ -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 @@ int main( int argc, char **argv ) {
   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 @@ int main( int argc, char **argv ) {
     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 @@ int main( int argc, char **argv ) {
                             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 @@ int main( int argc, char **argv ) {
   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 @@ int main( int argc, char **argv ) {
     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 6c9d251..248808d 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index d375f37..f0116f5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2002/09/25 01:09:49 sedwards Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:17 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = mktime
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f38b91e..f5cf40b 100644 (file)
@@ -25,4 +25,5 @@ int main(void)
         (void)puts(daybuf);
     }
     return 0;
-}
\ No newline at end of file
+}
+
index a386511..2b369c0 100644 (file)
@@ -10,7 +10,7 @@ CLT_OBJECTS = msclient.o
 
 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 889dc7c..4d67980 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/05/26 10:51:20 rcampbell Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:18 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 389b80e..12b6b26 100644 (file)
@@ -28,7 +28,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
 
   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 926ecc3..0da7ad5 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: makefile,v 1.2 2002/06/02 19:24:59 chorns Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:18 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f19655a..ed9db58 100644 (file)
@@ -10,7 +10,7 @@ CLT_OBJECTS = npclient.o
 
 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 3ab26c1..2dd34de 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/10/31 21:41:32 arty Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:18 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 15385bb..6aa5f7d 100644 (file)
@@ -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 @@ int main( int argc, char **argv ) {
   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 @@ int main( int argc, char **argv ) {
                          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 @@ int main( int argc, char **argv ) {
     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 @@ int main( int argc, char **argv ) {
                          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;
     }
index 28b00d2..a7edc02 100644 (file)
@@ -1,4 +1,3 @@
-
 PATH_TO_TOP = ../../..
 
 TARGET_NORC = yes
@@ -13,6 +12,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = pal.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index ecf5d9a..347b833 100644 (file)
@@ -9,9 +9,9 @@ TARGET_NAME = patblt
 
 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 157a651..5ad8c61 100644 (file)
@@ -9,7 +9,7 @@ TARGET_APPTYPE = console
 
 TARGET_NAME = pipe
 
-TARGET_CFLAGS = -DSTANDALONE
+TARGET_CFLAGS = -DSTANDALONE -Wall -Werror
 
 TARGET_SDKLIBS = ntdll.a kernel32.a
 
index 349d9ca..3db6c64 100644 (file)
@@ -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 @@ void test_DisconnectNamedPipe(void)
 
 }
 
+int
 START_TEST(pipe)
 {
     msg("test 1 of 4:\n");
@@ -599,4 +601,5 @@ START_TEST(pipe)
     msg("test 4 of 4:\n");
     test_CreateNamedPipe();
     msg("all tests done\n");
+       return 0;
 }
index 8c985f7..d97c981 100644 (file)
@@ -14,9 +14,9 @@ TARGET_NAME = primitives
 
 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 4b8a4df..bd0b363 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.8 2002/06/02 19:25:00 chorns Exp $
+# $Id: Makefile,v 1.9 2003/11/14 17:13:19 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 6e3592d..f91a2c1 100644 (file)
@@ -15,9 +15,9 @@ int main(int argc, char* argv[])
 
    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 e521248..3acd56b 100644 (file)
@@ -18,6 +18,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
 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 87aa331..8da5ae0 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: makefile,v 1.7 2002/06/02 19:25:00 chorns Exp $
+# $Id: makefile,v 1.8 2003/11/14 17:13:19 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index d137e5f..0996d0d 100644 (file)
@@ -584,14 +584,10 @@ void test4(void)
 
 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 @@ void test6(void)
   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 8e00d0f..93fefae 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3 2002/06/02 19:25:00 chorns Exp $
+# $Id: Makefile,v 1.4 2003/11/14 17:13:20 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = sectest
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index c244a92..2a0a387 100644 (file)
@@ -1,71 +1,73 @@
-/* $Id: sectest.c,v 1.4 2002/09/08 10:22:01 chorns Exp $ */\r
-#define UNICODE\r
-#define _UNICODE\r
-#include <windows.h>\r
-\r
-int main(int argc, char* argv[])\r
-{\r
-  HANDLE hFile;\r
-  HANDLE Section;\r
-  PVOID BaseAddress;\r
-  \r
-  printf("Section Test\n");\r
-  \r
-  hFile = CreateFile(_T("sectest.txt"),\r
-                    GENERIC_READ | GENERIC_WRITE, \r
-                    0, \r
-                    NULL, \r
-                    CREATE_ALWAYS, \r
-                    0, \r
-                    0);\r
-  if (hFile == INVALID_HANDLE_VALUE)\r
-    {\r
-      printf("Failed to create file (err=%d)", GetLastError());\r
-      return 1;\r
-    }\r
-  \r
-  Section = CreateFileMapping(hFile,\r
-                             NULL,\r
-                             PAGE_READWRITE, \r
-                             0,\r
-                             4096,\r
-                             NULL);\r
-  if (Section == NULL)\r
-    {\r
-      printf("Failed to create section (err=%d)", GetLastError());\r
-      return 1;\r
-    }\r
-  \r
-  printf("Mapping view of section\n");\r
-  BaseAddress = MapViewOfFile(Section,\r
-                             FILE_MAP_ALL_ACCESS,\r
-                             0,\r
-                             0,\r
-                             4096);\r
-  printf("BaseAddress %x\n", (UINT) BaseAddress);\r
-  if (BaseAddress == NULL)\r
-    {\r
-      printf("Failed to map section (%d)\n", GetLastError());\r
-      return 1;\r
-    }\r
-  \r
-  printf("Clearing section\n");\r
-  FillMemory(BaseAddress, 4096, ' ');\r
-  printf("Copying test data to section\n");\r
-  strcpy(BaseAddress, "test data");\r
-  \r
-  if (!UnmapViewOfFile(BaseAddress))\r
-    {  \r
-      printf("Failed to unmap view of file (%d)\n", GetLastError());\r
-      return 1;\r
-    }\r
-  \r
-  if (!CloseHandle(hFile))\r
-    {  \r
-      printf("Failed to close file (%d)\n", GetLastError());\r
-      return 1;\r
-    }\r
-  \r
-  return 0;\r
-}\r
-\r
+/* $Id: sectest.c,v 1.5 2003/11/14 17:13:20 weiden Exp $ */
+#define UNICODE
+#define _UNICODE
+#include <windows.h>
+#include <stdio.h>
+#include <string.h>
+
+int main(int argc, char* argv[])
+{
+  HANDLE hFile;
+  HANDLE Section;
+  PVOID BaseAddress;
+  
+  printf("Section Test\n");
+  
+  hFile = CreateFile(_T("sectest.txt"),
+                    GENERIC_READ | GENERIC_WRITE, 
+                    0, 
+                    NULL, 
+                    CREATE_ALWAYS, 
+                    0, 
+                    0);
+  if (hFile == INVALID_HANDLE_VALUE)
+    {
+      printf("Failed to create file (err=%ld)", GetLastError());
+      return 1;
+    }
+  
+  Section = CreateFileMapping(hFile,
+                             NULL,
+                             PAGE_READWRITE, 
+                             0,
+                             4096,
+                             NULL);
+  if (Section == NULL)
+    {
+      printf("Failed to create section (err=%ld)", GetLastError());
+      return 1;
+    }
+  
+  printf("Mapping view of section\n");
+  BaseAddress = MapViewOfFile(Section,
+                             FILE_MAP_ALL_ACCESS,
+                             0,
+                             0,
+                             4096);
+  printf("BaseAddress %x\n", (UINT) BaseAddress);
+  if (BaseAddress == NULL)
+    {
+      printf("Failed to map section (%ld)\n", GetLastError());
+      return 1;
+    }
+  
+  printf("Clearing section\n");
+  FillMemory(BaseAddress, 4096, ' ');
+  printf("Copying test data to section\n");
+  strcpy(BaseAddress, "test data");
+  
+  if (!UnmapViewOfFile(BaseAddress))
+    {  
+      printf("Failed to unmap view of file (%ld)\n", GetLastError());
+      return 1;
+    }
+  
+  if (!CloseHandle(hFile))
+    {  
+      printf("Failed to close file (%ld)\n", GetLastError());
+      return 1;
+    }
+  
+  return 0;
+}
+
index 0e4c6a9..96051f5 100644 (file)
@@ -15,6 +15,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 09c436d..e6d7c4e 100644 (file)
@@ -11,7 +11,6 @@ int main(int argc, char *argv[])
     CHAR rxBuffer[BUFSIZE];
     DWORD dwBaud = 9600;
     DWORD dwNumWritten;
-    DWORD dwNumRead;
     DWORD dwErrors;
     DCB dcb;
     BOOL bResult;
@@ -40,20 +39,20 @@ int main(int argc, char *argv[])
                        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 @@ int main(int argc, char *argv[])
  */
        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 @@ int main(int argc, char *argv[])
 
     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 @@ int main(int argc, char *argv[])
     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 9c4e81f..6f8a915 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.2 2003/08/15 18:51:31 royce Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:20 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -16,6 +16,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index a069b10..65e62f1 100644 (file)
@@ -10,7 +10,7 @@ CLT_OBJECTS= shmclt.o
 
 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 2531b1c..3638379 100644 (file)
@@ -1,4 +1,3 @@
-
 PATH_TO_TOP = ../../..
 
 TARGET_NORC = yes
@@ -13,6 +12,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index cdb3d0a..c5a8acd 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 5716c75..2aef3b5 100644 (file)
@@ -9,9 +9,9 @@ TARGET_NAME = stretchblt
 
 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 1969480..ef7bed1 100644 (file)
@@ -20,6 +20,8 @@ HWND HListBox = NULL;
 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 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
     LPTSTR lpCmdLine, int nCmdShow)
 {
    HInst = HInstance;
+   HPrevInst = HPrevInstance;
+   cmdline = lpCmdLine;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
index a8c3c55..00b1834 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/11/08 22:10:15 gvg Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:20 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,7 +14,7 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
 
 include $(PATH_TO_TOP)/rules.mak
 
index ca7fbcf..29c40fd 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/07/20 12:17:19 dwelch Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:20 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = suspend
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 048c771..15a245f 100644 (file)
@@ -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 @@ main(int argc, char *argv[])
 
   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 60b2cdd..e08f9a0 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2002/06/17 06:01:17 sedwards Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a ws2_32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 4d7b682..10eda65 100644 (file)
@@ -12,6 +12,8 @@
 
 #include <winsock2.h>
 #include <stdio.h>
+#include <string.h>
+#include <io.h>
 
 #undef ERROR
 #define SUCCESS 0
index a237952..48ff88f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/07/21 21:44:28 dwelch Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = terminate
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index a4cc7e4..b82ae6d 100644 (file)
@@ -3,6 +3,7 @@
 #define NTOS_MODE_USER
 #include <ntos.h>
 #include <windows.h>
+#include <stdio.h>
 
 #define DBG
 #define NDEBUG
index 942eb80..2607845 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 5c0d019..c15d9e7 100644 (file)
@@ -8,7 +8,7 @@ PROGS = GetSystemInfo
 OBJECTS = GetSystemInfo.o
 
 LIBS =  
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index a84da11..1dbcbeb 100644 (file)
@@ -8,7 +8,7 @@ PROGS = Parent_Child
 OBJECTS = Parent_Child.o
 
 LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a 
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index 9461982..7abb84c 100644 (file)
@@ -8,7 +8,7 @@ PROGS = guitest
 OBJECTS = guitest.o 
 
 LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a 
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index 8052c7f..12be8cd 100644 (file)
@@ -8,7 +8,7 @@ PROGS = hello
 OBJECTS = hello.o
 
 LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a 
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index f1efe38..044648e 100644 (file)
@@ -8,7 +8,7 @@ PROGS = new
 OBJECTS = new.o
 
 LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a 
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index 7cbb5a0..96a9ce0 100644 (file)
@@ -8,7 +8,7 @@ PROGS = rolex
 OBJECTS = rolex.o
 
 LIBS = $(PATH_TO_TOP)/dk/w32/lib/gdi32.a 
-CFLAGS =
+CFLAGS = -Wall -Werror
 
 all: $(PROGS:%=%.exe)
 
index 8842a1c..b029c51 100644 (file)
@@ -13,6 +13,8 @@ TARGET_NAME = volinfo
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 7cae473..f64ad08 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.7 2002/06/02 19:25:01 chorns Exp $
+# $Id: makefile,v 1.8 2003/11/14 17:13:21 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index e781951..b7ccf56 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.8 2002/08/09 17:23:56 dwelch Exp $
+/* $Id: thread.c,v 1.9 2003/11/14 17:13:21 weiden Exp $
  *
  *
  *
@@ -40,7 +40,6 @@ printf("\texample: thread.exe 100\n");
 
 int main (int argc, char* argv[])
 {
-   HANDLE hThread;
    DWORD i=0;
    DWORD id;
    ULONG nr;
index c81f127..7b0a8da 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/07/23 17:00:55 gvg Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f62d05f..dc8359b 100644 (file)
@@ -41,7 +41,7 @@ DWORD WINAPI thread( LPVOID crap )
 
        /* 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 @@ DWORD WINAPI thread( LPVOID crap )
 
 int main( int argc, char **argv )
 {
-       DWORD id, Status;
+       DWORD id;
 
        printf( "Creating events\n" );
 
index 398ba46..5180a84 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/09/10 06:12:21 vizzini Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:21 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 2039119..683bcc0 100644 (file)
@@ -21,7 +21,7 @@ int main(int ac, char **av)
        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 c7050d0..97c219b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.2 2003/07/30 14:08:16 royce Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = tokentest.o
 
+TARGET_CFLAGS = -Wall -Werror -Wno-format
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index e0bbdbc..6578f52 100644 (file)
@@ -3,6 +3,7 @@
 
 #define ANONYMOUSUNIONS
 #include <windows.h>
+#include <stdlib.h>
 
 #define INCLUDE_THE_DDK_HEADERS
 #ifdef INCLUDE_THE_DDK_HEADERS
@@ -327,7 +328,7 @@ BOOL
 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 @@ EnablePrivilege(LPWSTR wszName)
 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;
@@ -483,7 +484,7 @@ CreateInitialSystemToken(HANDLE* phSystemToken)
 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 int
-main(int argc, char** argv[])
+main(int argc, char* argv[])
 {
        NTSTATUS Status;
        HANDLE hSystemToken;
index 16a3359..3447a96 100644 (file)
@@ -9,9 +9,9 @@ TARGET_NAME = txtscale
 
 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 4711259..bf29513 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.6 2002/06/02 19:25:01 chorns Exp $
+# $Id: Makefile,v 1.7 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index d68ebbb..ec7235c 100644 (file)
@@ -50,5 +50,6 @@ int main()
      {
        printf("VirtualAlloc failed 5\n");
      }
+   return 0;
 }
 
index 9a67e53..f2dec18 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.4 2003/07/30 14:08:16 royce Exp $
+# $Id: makefile,v 1.5 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index cbde33d..89da418 100644 (file)
@@ -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 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                      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 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
          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 3833189..235dbad 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/09/24 16:11:05 weiden Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 5457698..eac5eaa 100644 (file)
@@ -31,7 +31,7 @@ WinMain(HINSTANCE hInstance,
   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 @@ WinMain(HINSTANCE hInstance,
                  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 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
        case WM_HSCROLL:
         {
           int nPos;
-         int Pos;
          int temp;
          RECT Rect;
          int nScrollCode;
@@ -456,7 +455,6 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
        case WM_VSCROLL:
         {
          int nPos;
-         int Pos;
          int temp;
          RECT Rect;
          int nScrollCode;
@@ -569,8 +567,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
          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 50c0986..866a14a 100644 (file)
@@ -9,9 +9,9 @@ TARGET_NAME = wm_erasebkgnd
 
 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 582673f..6bfa5a3 100644 (file)
@@ -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 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
     LPTSTR lpCmdLine, int nCmdShow)
 {
    HInst = HInstance;
+   HPrevInst = HPrevInstance;
+   cmdline = lpCmdLine;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
index 9fccf77..371c23e 100644 (file)
@@ -13,6 +13,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 8d9174a..7da173e 100644 (file)
@@ -13,6 +13,7 @@
 
 //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 #include <windows.h>
+#include <string.h>
 //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
index fd767c0..87517ed 100644 (file)
@@ -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 @@ int __cdecl main(int argc, char* argv[])
 {
     char* libs[MAX_LIBS];
     int lib_count = 0;
-    int test_num = 0;
     int result = 0;
     int i = 0;
 
index a10e244..77a8718 100644 (file)
@@ -11,6 +11,8 @@ TARGET_APPTYPE = console
 
 TARGET_NAME = loadlib
 
+TARGET_CFLAGS = -Wall -Werror
+
 #TARGET_CFLAGS = -DDBG -DUNICODE -D_UNICODE
 
 TARGET_SDKLIBS = kernel32.a ntdll.a 
index 4b230bd..8dfa2e9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.10 2002/06/07 22:57:41 ekohl Exp $
+# $Id: makefile,v 1.11 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_NAME = cat
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 2b8308f..e33e105 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: consw.c,v 1.1 2003/07/29 20:38:30 jimtabor Exp $
+/* $Id: consw.c,v 1.2 2003/11/14 17:13:22 weiden Exp $
  *
  * DESCRIPTION: Console mode switcher
  * PROGRAMMER:  Art Yerkes
@@ -23,6 +23,7 @@ int main(int argc, char* argv[])
                             0,
                             !strcmp( argv[1], "hw" ) );
   }
+  return 0;
 }
 
 
index 7e6192e..18ab10e 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/07/29 20:38:30 jimtabor Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index cc45b69..1500995 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.4 2003/11/11 17:01:22 ekohl Exp $
+# $Id: makefile,v 1.5 2003/11/14 17:13:22 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -10,7 +10,7 @@ TARGET_APPTYPE = console
 
 TARGET_NAME = partinfo
 
-#TARGET_CFLAGS = -Wall -Werror
+TARGET_CFLAGS = -Wall -Werror -Wno-format
 
 TARGET_SDKLIBS = ntdll.a kernel32.a
 
index 4cadccf..d1ecd48 100644 (file)
@@ -11,7 +11,7 @@ TARGET_APPTYPE = console
 
 TARGET_NAME = sc
 
-TARGET_CFLAGS = -DDBG
+TARGET_CFLAGS = -DDBG -Werror -Wall
 
 TARGET_SDKLIBS = kernel32.a ntdll.a advapi32.a
 
index 525d055..fb0ec6d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2002/06/07 22:58:37 ekohl Exp $
+# $Id: Makefile,v 1.3 2003/11/14 17:13:23 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index e60af40..3f05865 100644 (file)
@@ -9,7 +9,7 @@
  */
 #include <windows.h>
 #include <tchar.h>
-
+#include <stdio.h>
 
 typedef struct _EXTENSION_INFO
 {
@@ -290,9 +290,9 @@ PrintStatistics()
     _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 @@ PrintStatistics()
   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 9679181..9e8a3e0 100644 (file)
@@ -12,6 +12,8 @@ TARGET_SDKLIBS = kernel32.a
 
 TARGET_OBJECTS = tickcount.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index c7e3738..a675b09 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
  *                         Address Spaces.
- *              $Revision: 1.1 $
+ *              $Revision: 1.2 $
  *
  *****************************************************************************/
 
@@ -71,8 +71,7 @@ acpi_install_address_space_handler (
        /* Parameter validation */
 
        if ((!device)   ||
-               ((!handler)  && (handler != ACPI_DEFAULT_HANDLER)) ||
-               (space_id > ACPI_MAX_ADDRESS_SPACE)) {
+               ((!handler)  && (handler != ACPI_DEFAULT_HANDLER))) {
                return (AE_BAD_PARAMETER);
        }
 
@@ -279,8 +278,7 @@ acpi_remove_address_space_handler (
        /* Parameter validation */
 
        if ((!device)   ||
-               ((!handler)  && (handler != ACPI_DEFAULT_HANDLER)) ||
-               (space_id > ACPI_MAX_ADDRESS_SPACE)) {
+               ((!handler)  && (handler != ACPI_DEFAULT_HANDLER))) {
                return (AE_BAD_PARAMETER);
        }
 
index 6ff8557..258b805 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: acpienum.c,v 1.3 2001/08/23 17:32:04 chorns Exp $
+/* $Id: acpienum.c,v 1.4 2003/11/14 17:13:23 weiden Exp $
  *
  * PROJECT:         ReactOS ACPI bus driver
  * FILE:            acpi/ospm/acpienum.c
@@ -109,7 +109,6 @@ ACPIEnumerateRootBusses(
   BM_HANDLE_LIST HandleList;
   PACPI_DEVICE AcpiDevice;
   ACPI_STATUS AcpiStatus;
-  BM_HANDLE DeviceHandle;
        BM_DEVICE_ID Criteria;
   KIRQL OldIrql;
   ULONG i;
@@ -174,7 +173,6 @@ ACPIEnumerateNamespace(
   BM_HANDLE_LIST HandleList;
   PACPI_DEVICE AcpiDevice;
   ACPI_STATUS AcpiStatus;
-  BM_HANDLE DeviceHandle;
        BM_DEVICE_ID Criteria;
   BM_NODE *Node;
   KIRQL OldIrql;
index 6fc5985..f4afcb2 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fdo.c,v 1.2 2002/05/05 14:57:45 chorns Exp $
+/* $Id: fdo.c,v 1.3 2003/11/14 17:13:23 weiden Exp $
  *
  * PROJECT:         ReactOS ACPI bus driver
  * FILE:            acpi/ospm/fdo.c
@@ -163,7 +163,6 @@ ACPIInitializeInternalDriver(
   ACPI_DRIVER_FUNCTION Terminate)
 {
   ACPI_STATUS AcpiStatus;
-  PACPI_DEVICE AcpiDevice;
 
   AcpiStatus = Initialize();
   if (!ACPI_SUCCESS(AcpiStatus)) {
@@ -198,8 +197,6 @@ ACPIInitializeInternalDrivers(
 {
   NTSTATUS Status;
 
-  ULONG j;
-
   Status = ACPIInitializeInternalDriver(DeviceExtension,
     bn_initialize, bn_terminate);
 
index bae1851..843f819 100644 (file)
@@ -34,7 +34,6 @@ static PVOID AcpiIrqContext = NULL;
 static ULONG AcpiIrqNumber = 0;
 static KDPC AcpiDpc;
 static PVOID IVTVirtualAddress = NULL;
-static PVOID BDAVirtualAddress = NULL;
 
 
 VOID STDCALL
@@ -525,7 +524,6 @@ acpi_os_wait_semaphore(
        u32                     units,
        u32                     timeout)
 {
-  ACPI_STATUS Status = AE_OK;
   PFAST_MUTEX Mutex = (PFAST_MUTEX)handle;
 
   if (!Mutex || (units < 1)) {
index f7d17c5..cc14bde 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pdo.c,v 1.1 2001/08/23 17:32:04 chorns Exp $
+/* $Id: pdo.c,v 1.2 2003/11/14 17:13:23 weiden Exp $
  *
  * PROJECT:         ReactOS ACPI bus driver
  * FILE:            acpi/ospm/pdo.c
@@ -23,7 +23,6 @@ PdoQueryId(
   PIO_STACK_LOCATION IrpSp)
 {
   PPDO_DEVICE_EXTENSION DeviceExtension;
-  ACPI_STATUS AcpiStatus;
   NTSTATUS Status;
 
   DPRINT("Called\n");
@@ -55,9 +54,7 @@ PdoSetPower(
   PIO_STACK_LOCATION IrpSp)
 {
   PPDO_DEVICE_EXTENSION DeviceExtension;
-  ACPI_STATUS AcpiStatus;
   NTSTATUS Status;
-  ULONG AcpiState;
 
   DPRINT("Called\n");
 
index 594ca3c..3284734 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: isapnp.c,v 1.7 2003/09/20 20:31:57 weiden Exp $
+/* $Id: isapnp.c,v 1.8 2003/11/14 17:13:24 weiden Exp $
  *
  * PROJECT:         ReactOS ISA PnP Bus driver
  * FILE:            isapnp.c
@@ -484,7 +484,6 @@ static NTSTATUS AddResourceList(
   PISAPNP_CONFIGURATION_LIST *NewList)
 {
   PISAPNP_CONFIGURATION_LIST List;
-  NTSTATUS Status;
 
   DPRINT("Adding resource list for logical device %d on card %d (Priority %d)\n",
         LogicalDevice->Number,
@@ -962,8 +961,8 @@ static BOOLEAN CreateLogicalDevice(PISAPNP_DEVICE_EXTENSION DeviceExtension,
                if (!ReadTag(&type, &Size, &Small))
                        return FALSE;
 
-               if (skip && !(Small && (type == ISAPNP_SRIN_LDEVICE_ID)
-      || (type == ISAPNP_SRIN_END_TAG)))
+                if (skip && !(Small && ((type == ISAPNP_SRIN_LDEVICE_ID)
+      || (type == ISAPNP_SRIN_END_TAG))))
                        goto skip;
 
     if (Small) {
@@ -1212,7 +1211,6 @@ static NTSTATUS BuildResourceList(PISAPNP_LOGICAL_DEVICE LogicalDevice,
   PLIST_ENTRY CurrentEntry, Entry;
   PISAPNP_CONFIGURATION_LIST List;
   PISAPNP_DESCRIPTOR Descriptor;
-  NTSTATUS Status;
   ULONG i;
 
   if (IsListEmpty(&LogicalDevice->Configuration))
@@ -1373,7 +1371,6 @@ static NTSTATUS BuildDeviceList(PISAPNP_DEVICE_EXTENSION DeviceExtension)
        ULONG csn;
        UCHAR header[9], checksum;
   PISAPNP_CARD Card;
-  NTSTATUS Status;
 
   DPRINT("Called\n");
 
index 656d4a3..8fc5c74 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.4 2001/08/21 20:13:10 chorns Exp $
+# $Id: makefile,v 1.5 2003/11/14 17:13:24 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,6 +8,8 @@ TARGET_NAME = isapnp
 
 TARGET_OBJECTS = isapnp.o
 
+TARGET_CFLAGS = -Werror -Wall
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index eb1ccc3..2a7d1a5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2001/09/16 13:18:24 chorns Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:24 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,6 +6,8 @@ TARGET_TYPE = driver
 
 TARGET_NAME = pci
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = fdo.o pci.o pdo.o
 
 include $(PATH_TO_TOP)/rules.mak
index a246e1b..8918fe6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pci.c,v 1.3 2003/04/26 07:06:55 hbirr Exp $
+/* $Id: pci.c,v 1.4 2003/11/14 17:13:24 weiden Exp $
  *
  * PROJECT:         ReactOS PCI Bus driver
  * FILE:            pci.c
@@ -48,6 +48,8 @@ PciReadConfigUchar(UCHAR Bus,
        *Value = READ_PORT_UCHAR((PUCHAR)(IOADDR(Slot, Offset)));
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
@@ -77,6 +79,8 @@ PciReadConfigUshort(UCHAR Bus,
        *Value = READ_PORT_USHORT((PUSHORT)(IOADDR(Slot, Offset)));
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
@@ -106,6 +110,8 @@ PciReadConfigUlong(UCHAR Bus,
        *Value = READ_PORT_ULONG((PULONG)(IOADDR(Slot, Offset)));
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
@@ -130,6 +136,8 @@ PciWriteConfigUchar(UCHAR Bus,
        WRITE_PORT_UCHAR((PUCHAR)(IOADDR(Slot,Offset)), Value);
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
@@ -159,6 +167,8 @@ PciWriteConfigUshort(UCHAR Bus,
        WRITE_PORT_USHORT((PUSHORT)(IOADDR(Slot, Offset)), Value);
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
@@ -188,6 +198,8 @@ PciWriteConfigUlong(UCHAR Bus,
        WRITE_PORT_ULONG((PULONG)(IOADDR(Slot, Offset)), Value);
        WRITE_PORT_UCHAR((PUCHAR)0xCF8, 0);
        return STATUS_SUCCESS;
+     case pbtUnknown:
+        break;
      }
    return STATUS_UNSUCCESSFUL;
 }
index f34012d..e8d5b36 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pci.h,v 1.2 2002/05/05 14:57:45 chorns Exp $ */
+/* $Id: pci.h,v 1.3 2003/11/14 17:13:24 weiden Exp $ */
 
 #ifndef __PCI_H
 #define __PCI_H
@@ -108,6 +108,13 @@ extern PCI_BUS_TYPE PciBusConfigType;
 PCI_BUS_TYPE
 PciGetBusConfigType(VOID);
 
+ULONG
+PciGetBusData(ULONG BusNumber,
+              ULONG SlotNumber,
+              PVOID Buffer,
+              ULONG Offset,
+               ULONG Length);
+
 BOOLEAN
 PciCreateUnicodeString(
   PUNICODE_STRING      Destination,
index cbe61da..153d045 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/08/24 12:11:13 dwelch Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:24 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,6 +8,8 @@ TARGET_NAME = bootvid
 
 TARGET_OBJECTS = bootvid.o pixelsup_i386.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index f0d392c..8e4afc0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: bootvid.c,v 1.3 2003/09/20 20:12:43 weiden Exp $
+/* $Id: bootvid.c,v 1.4 2003/11/14 17:13:24 weiden Exp $
  *
  * COPYRIGHT:      See COPYING in the top level directory
  * PROJECT:        ReactOS kernel
@@ -788,7 +788,6 @@ DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
 {
   PDEVICE_OBJECT BootVidDevice;
   UNICODE_STRING DeviceName;
-  UNICODE_STRING DosName;
   NTSTATUS Status;
 
   BootVidDriverObject = DriverObject;
index c76a8e0..ba0b024 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/05/22 15:11:29 gvg Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:24 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,6 +8,8 @@ TARGET_NAME = debugout
 
 TARGET_OBJECTS = debugout.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index a50a63a..ea15dd7 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.26 2002/07/04 19:56:32 dwelch Exp $
+# $Id: makefile,v 1.27 2003/11/14 17:13:25 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,6 +6,8 @@ TARGET_TYPE = driver
 
 TARGET_NAME = ide
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = ide.o
 
 TARGET_HEADERS = *.h
index 8d99ee8..86d09fe 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.15 2001/08/21 20:13:11 chorns Exp $
+# $Id: makefile,v 1.16 2003/11/14 17:13:25 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,6 +8,8 @@ TARGET_NAME = serial
 
 TARGET_OBJECTS = serial.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 7bd03e9..f1395ef 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: serial.c,v 1.10 2002/10/06 13:16:26 robd Exp $
+/* $Id: serial.c,v 1.11 2003/11/14 17:13:25 weiden Exp $
  *
  * Serial driver
  * Written by Jason Filby (jasonfilby@yahoo.com)
@@ -32,7 +32,6 @@ int uart_detect(unsigned base)
 {
         // Returns 0 if no UART detected
 
-        int olddata=inb_p(base+4);
         outb_p(base+4, 0x10);
         if ((inb_p(base+6) & 0xf0)) return 0;
         return 1;
index 34b2f9f..fd5f8e8 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * entry.c
  *
- * $Revision: 1.28 $
- * $Author: gvg $
- * $Date: 2003/05/04 15:41:40 $
+ * $Revision: 1.29 $
+ * $Author: weiden $
+ * $Date: 2003/11/14 17:13:25 $
  *
  */
 
@@ -365,7 +365,6 @@ DrvDisableSurface(IN DHPDEV PDev)
 {
   PPDEV ppdev = (PPDEV)PDev;
   PDEVSURF pdsurf = ppdev->AssociatedSurf;
-  PSAVED_SCREEN_BITS pSSB, pSSBNext;
   CHECKPOINT;
   DPRINT( "KMDriver: %x\n", ppdev->KMDriver );
   //  EngFreeMem(pdsurf->BankSelectInfo);
@@ -603,6 +602,7 @@ DrvGetModes(IN HANDLE Driver,
 
     } while (--NumModes);
   }
+  return OutputSize;
 }
 
 /* EOF */
index 825e72e..835237d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.20 2003/02/25 23:08:51 gvg Exp $
+# $Id: makefile,v 1.21 2003/11/14 17:13:25 weiden Exp $
 
 PATH_TO_TOP = ../../../..
 
@@ -8,6 +8,8 @@ TARGET_TYPE = gdi_driver
 
 TARGET_NAME = vgaddi
 
+TARGET_CFLAGS = -Wall -Werror
+
 MAIN_OBJECTS = \
   main/enable.o
 
index 15bcb54..0fd8ee2 100644 (file)
@@ -62,22 +62,18 @@ DIBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
                             Source->pvScan0 + SourcePoint->y * Source->lDelta + (SourcePoint->x >> 1),
                            Source->lDelta, ColorTranslation);
     }
+  return FALSE;
 }
 
 BOOL 
 VGAtoDIB(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
         RECTL *DestRect, POINTL *SourcePoint)
 {
-  LONG i, j, dx, dy, RGBulong;
-  BYTE  *GDIpos, *initial, idxColor;
+  LONG i, j, dx, dy;
+  BYTE  *GDIpos, *initial;
   
   // Used by the temporary DFB
-  PDEVSURF     TargetSurf;
   DEVSURF      DestDevSurf;
-  PSURFOBJ     TargetBitmapSurf;
-  HBITMAP      hTargetBitmap;
-  SIZEL                InterSize;
-  POINTL       ZeroPoint;
 
   // FIXME: Optimize to retrieve entire bytes at a time (see /display/vgavideo/vgavideo.c:vgaGetByte)
 
@@ -106,12 +102,14 @@ VGAtoDIB(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
        GDIpos = initial + Dest->lDelta;
     }
   }
+  return FALSE;
 }
 
 BOOL 
 DFBtoVGA(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
         RECTL *DestRect, POINTL *SourcePoint)
 {
+  return FALSE;
   // Do DFBs need color translation??
 }
 
@@ -119,6 +117,7 @@ BOOL
 VGAtoDFB(SURFOBJ *Dest, SURFOBJ *Source, XLATEOBJ *ColorTranslation,
         RECTL *DestRect, POINTL *SourcePoint)
 {
+  return FALSE;
   // Do DFBs need color translation??
 }
 
@@ -176,7 +175,6 @@ VGADDI_BltBrush(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ MaskSurf,
 {
   UCHAR SolidColor = 0;
   ULONG Left;
-  ULONG Right;
   ULONG Length;
   PUCHAR Video;
   UCHAR Mask;
@@ -298,8 +296,6 @@ VGADDI_BltSrc(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
               PXLATEOBJ ColorTranslation, PRECTL DestRect, PPOINTL SourcePoint,
               PPOINTL MaskOrigin, PBRUSHOBJ Brush, PPOINTL BrushOrigin, ROP4 Rop4)
 {
-  RECT_ENUM RectEnum;
-  BOOL EnumMore;
   PFN_VGABlt  BltOperation;
   ULONG SourceType;
 
@@ -341,8 +337,8 @@ VGADDI_BltMask(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
                PPOINTL SourcePoint, PPOINTL MaskPoint, BRUSHOBJ* Brush,
               PPOINTL BrushPoint, ROP4 Rop4)
 {
-  LONG i, j, dx, dy, idxColor, RGBulong = 0, c8;
-  BYTE *initial, *tMask, *lMask;
+  LONG i, j, dx, dy, c8;
+  BYTE *tMask, *lMask;
 
   dx = DestRect->right  - DestRect->left;
   dy = DestRect->bottom - DestRect->top;
@@ -369,6 +365,7 @@ VGADDI_BltMask(PSURFOBJ Dest, PSURFOBJ Source, PSURFOBJ Mask,
            }
        }
     }
+  return TRUE;
 }
 
 BOOL STDCALL
index 7778a65..3319a46 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: lineto.c,v 1.15 2003/08/11 04:23:37 royce Exp $
+ * $Id: lineto.c,v 1.16 2003/11/14 17:13:25 weiden Exp $
  */
 
 #include "../vgaddi.h"
@@ -303,7 +303,6 @@ DrvLineTo(SURFOBJ *DestObj,
 {
   LONG x, y, deltax, deltay, i, xchange, ychange, hx, vy;
   ULONG Pixel = Brush->iSolidColor;
-  RECTL DestRect;
   RECT_ENUM RectEnum;
   BOOL EnumMore;
 
index 16e36d3..a4133f7 100644 (file)
@@ -8,10 +8,10 @@
 BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor)
 {
   int x, y, x2, y2, w, h;
-  ULONG offset, i, j, pre1;
+  ULONG offset, j, pre1;
   ULONG orgpre1, orgx, midpre1, tmppre1;
   ULONG ileftpix, imidpix, irightpix;
-  double leftpix, midpix, rightpix, temp;
+  double leftpix, midpix, rightpix;
   UCHAR a;
 
   DPRINT("VGADDIFillSolid: x:%d, y:%d, w:%d, h:%d\n", x, y, w, h);
index 6374909..c75bb93 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: pointer.c,v 1.16 2003/11/10 19:42:57 weiden Exp $
+/* $Id: pointer.c,v 1.17 2003/11/14 17:13:25 weiden Exp $
  *
  * PROJECT:         ReactOS VGA16 display driver
  * FILE:            drivers/dd/vga/display/objects/pointer.c
@@ -218,7 +218,7 @@ DrvSetPointerShape(PSURFOBJ pso,
   PPDEV ppdev = (PPDEV)pso->dhpdev;
   ULONG NewWidth, NewHeight;
   PUCHAR Src, Dest;
-  ULONG i, j;
+  ULONG i;
   
   if(!psoMask)
   {
@@ -292,7 +292,6 @@ DrvSetPointerShape(PSURFOBJ pso,
 VOID
 VGADDI_HideCursor(PPDEV ppdev)
 {
-  ULONG i, j, cx, cy, bitpos;
   ULONG SizeX, SizeY;
 
   /* Display what was behind cursor */
@@ -311,7 +310,7 @@ VGADDI_HideCursor(PPDEV ppdev)
 VOID
 VGADDI_ShowCursor(PPDEV ppdev)
 {
-  ULONG i, j, cx, cy;
+  ULONG cx, cy;
   PUCHAR AndMask, XorMask;
   ULONG SizeX, SizeY;
 
index db6a702..7008ee1 100644 (file)
@@ -104,10 +104,6 @@ DWORD getAvailableModes(HANDLE Driver,
 BOOL InitVGA(PPDEV ppdev, BOOL bFirst)
 {
   ULONG ReturnedDataLength;
-  VIDEO_MEMORY VideoMemory;
-  VIDEO_MEMORY_INFORMATION VideoMemoryInfo;
-
-  char* vidmem;
 
   ppdev->sizeSurf.cx = 640;
   ppdev->sizeSurf.cy = 480;
index b89d9e4..4610d35 100644 (file)
@@ -234,6 +234,11 @@ VGADDI_AllocSavedScreenBits(ULONG Size);
 VOID
 VGADDI_InitializeOffScreenMem(ULONG Start, ULONG Length);
 
+BOOL InitPointer(PPDEV ppdev);
+DWORD getAvailableModes(HANDLE Driver,
+                        PVIDEO_MODE_INFORMATION *modeInformation,
+                        DWORD *ModeSize);
+
 void FASTCALL
 vgaReadScan ( int x, int y, int w, void *b );
 
index 5af41d0..e2a7316 100644 (file)
@@ -14,12 +14,6 @@ int endmasks[8];
 char* vidmem;
 static ULONG UnpackPixel[256];
 
-static unsigned char saved_SEQ_mask;   /* 0x02 */
-static unsigned char saved_GC_eSR;     /* 0x01 */
-static unsigned char saved_GC_fun;     /* 0x03 */
-static unsigned char saved_GC_rmap;    /* 0x04 */
-static unsigned char saved_GC_mode;    /* 0x05 */
-static unsigned char saved_GC_mask;    /* 0x08 */
 static unsigned char leftMask;
 static int byteCounter;
 static unsigned char rightMask;
@@ -270,7 +264,7 @@ INT vgaGetPixel(INT x, INT y)
 BOOL vgaHLine(INT x, INT y, INT len, UCHAR c)
 {
   UCHAR a;
-  ULONG pre1, i;
+  ULONG pre1;
   ULONG orgpre1, orgx, midpre1;
   ULONG ileftpix, imidpix, irightpix;
 
@@ -672,7 +666,6 @@ vgaReadScan ( int x, int y, int w, void *b )
   unsigned char data, mask, maskP;
   unsigned char *bp;
   unsigned char plane_mask;
-  int byte_per_line = SCREEN_X >> 3;
   int plane, i;
 
   ASSIGNVP4(x, y, vpP)
index 77be5ab..7ecc090 100644 (file)
@@ -69,3 +69,7 @@ void get_masks(int x, int w);
 
 #define mod8(n) ((n)&7)
 #define mod2(n) ((n)&1)
+void DIB_BltFromVGA(int x, int y, int w, int h, void *b, int Dest_lDelta);
+void DIB_BltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, int StartMod);
+void DIB_BltToVGAWithXlate(int x, int y, int w, int h, void *b, int Source_lDelta, PXLATEOBJ Xlate);
+void DIB_TransparentBltToVGA(int x, int y, int w, int h, void *b, int Source_lDelta, ULONG trans);
index d2a4ead..2939d73 100644 (file)
@@ -14,7 +14,6 @@ void outxay(PUSHORT ad, UCHAR x, UCHAR y)
 void setMode(VideoMode mode)
 {
   unsigned char x;
-  unsigned int y, c, a, m, n;
 
   VideoPortWritePortUchar((PUCHAR)MISC, mode.Misc);
   VideoPortWritePortUchar((PUCHAR)STATUS, 0);
@@ -98,7 +97,6 @@ void InitVGAMode()
 
 VOID  VGAResetDevice(OUT PSTATUS_BLOCK  StatusBlock)
 {
-  char *vidmem;
   HANDLE Event;
   OBJECT_ATTRIBUTES Attr;
   UNICODE_STRING Name = UNICODE_STRING_INITIALIZER(L"\\TextConsoleRefreshEvent");
index e87b801..f532b62 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.10 2003/02/15 19:16:33 gvg Exp $
+# $Id: makefile,v 1.11 2003/11/14 17:13:25 weiden Exp $
 
 PATH_TO_TOP = ../../../..
 
@@ -8,6 +8,8 @@ TARGET_NAME = vgamp
 
 TARGET_DDKLIBS = videoprt.a
 
+TARGET_CFLAGS = -Werror -Wall
+
 TARGET_OBJECTS = \
   initvga.o \
   vgamp.o \
index f89dec1..8dd9cd1 100644 (file)
@@ -9,7 +9,7 @@
 #define UNIMPLEMENTED do {DbgPrint("%s:%d: Function not implemented", __FILE__, __LINE__); for(;;);} while (0)
 
 #define VERSION "0.0.0"
-
+void InitVGAMode();
 //  ----------------------------------------------------  Forward Declarations
 static VP_STATUS STDCALL
 VGAFindAdapter(PVOID DeviceExtension,
index 7f51741..6ca456a 100644 (file)
@@ -546,7 +546,6 @@ KeyboardHandler(PKINTERRUPT Interrupt,
      {
        KEY_EVENT_RECORD* rec = (KEY_EVENT_RECORD *)
          CurrentIrp->AssociatedIrp.SystemBuffer;
-       PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(CurrentIrp);
        
        CHECKPOINT;
        
index f628726..a241be9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.8 2003/04/05 09:37:43 chorns Exp $
+# $Id: makefile,v 1.9 2003/11/14 17:13:25 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,6 +8,8 @@ TARGET_TYPE = driver
 
 TARGET_NAME = keyboard
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
index ff7302a..4440edf 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.7 2001/08/21 20:13:14 chorns Exp $
+# $Id: makefile,v 1.8 2003/11/14 17:13:26 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,6 +6,8 @@ TARGET_TYPE = driver
 
 TARGET_NAME = mouclass
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = $(TARGET_NAME).o
 
 include $(PATH_TO_TOP)/rules.mak
index 5ac3ed2..5bc2f50 100644 (file)
@@ -58,9 +58,7 @@ BOOLEAN MouseClassCallBack(PDEVICE_OBJECT ClassDeviceObject, PMOUSE_INPUT_DATA M
                        PMOUSE_INPUT_DATA MouseDataEnd, PULONG InputCount)
 {
    PDEVICE_EXTENSION ClassDeviceExtension = ClassDeviceObject->DeviceExtension;
-   PIRP Irp;
    ULONG ReadSize;
-   PIO_STACK_LOCATION Stack;
    KIRQL OldIrql;
 
    // In classical NT, you would take the input data and pipe it through the IO system, for the GDI to read.
index 408650e..ecec69d 100644 (file)
@@ -10,6 +10,7 @@
 /* This reads the controller status port, and does the appropriate
    action. It requires that we hold the keyboard controller spinlock. */
 
+int controller_read_data(void);
 unsigned handle_event(void)
 {
   unsigned status = controller_read_status();
index 7269b25..055cade 100644 (file)
 #define controller_read_status() READ_PORT_UCHAR ((PUCHAR)CONTROLLER_REGISTER_STATUS)
 #define controller_write_output(value) WRITE_PORT_UCHAR ((PUCHAR)CONTROLLER_REGISTER_DATA, value)
 #define controller_write_command(value) WRITE_PORT_UCHAR ((PUCHAR)CONTROLLER_REGISTER_CONTROL, value)
+void controller_write_command_word(unsigned data);
index 448c8ef..1481266 100644 (file)
@@ -18,6 +18,7 @@
  * Process a PS2++ or PS2T++ packet.
  */
 
+int SendCommand(PDEVICE_EXTENSION DeviceExtension, unsigned char *param, int command);
 void PS2PPProcessPacket(PDEVICE_EXTENSION DeviceExtension, PMOUSE_INPUT_DATA Input, int *wheel)
 {
     unsigned char *packet = DeviceExtension->MouseBuffer;
@@ -154,7 +155,6 @@ int PS2PPDetectModel(PDEVICE_EXTENSION DeviceExtension, unsigned char *param)
 {
        int i;
        //char *vendor, *name;
-       static int logitech_4btn[] = { 12, 40, 41, 42, 43, 52, 73, 80, -1 };
        static int logitech_wheel[] = { 52, 53, 75, 76, 80, 81, 83, 88, 112, -1 };
        static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43, 50, 51, 52, 53, 73, 75,
                                                76, 80, 81, 83, 88, 96, 97, 112, -1 };
index ce6a103..8f1a3eb 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.8 2003/09/28 00:30:34 weiden Exp $
+# $Id: makefile,v 1.9 2003/11/14 17:13:26 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,6 +6,8 @@ TARGET_TYPE = driver
 
 TARGET_NAME = psaux
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = $(TARGET_NAME).o controller.o mouse.o logips2pp.o synaptics.o
 
 include $(PATH_TO_TOP)/rules.mak
index a01658f..78031a0 100644 (file)
 #include <debug.h>
 
 
+int InitSynaptics(PDEVICE_EXTENSION DeviceExtension);
+void PS2PPProcessPacket(PDEVICE_EXTENSION DeviceExtension, PMOUSE_INPUT_DATA Input, int *wheel);
+void PS2PPSet800dpi(PDEVICE_EXTENSION DeviceExtension);
+int PS2PPDetectModel(PDEVICE_EXTENSION DeviceExtension, unsigned char *param);
+
 // Parse incoming packets
 BOOLEAN FASTCALL
 ParsePackets(PDEVICE_EXTENSION DeviceExtension, PMOUSE_INPUT_DATA Input)
@@ -128,7 +133,6 @@ MouseHandler(PKINTERRUPT Interrupt, PVOID ServiceContext)
   PMOUSE_INPUT_DATA Input;
   ULONG Queue;
   BOOLEAN ret;
-  int state_dx, state_dy;
   unsigned scancode;
   unsigned status = controller_read_status();
   scancode = controller_read_input();
@@ -177,6 +181,7 @@ MouseHandler(PKINTERRUPT Interrupt, PVOID ServiceContext)
     
     return ret;
   }
+  return TRUE;
 }
 
 
@@ -567,8 +572,6 @@ BOOLEAN SetupMouse(PDEVICE_OBJECT DeviceObject, PUNICODE_STRING RegistryPath)
   ULONG MappedIrq;
   KIRQL Dirql;
   KAFFINITY Affinity;
-  unsigned scancode;
-  unsigned char status;
   LARGE_INTEGER Millisecond_Timeout;
   
   Millisecond_Timeout.QuadPart = 1;
index 192a452..4d0e720 100644 (file)
 #define MOUSE_ISINTELLIMOUSE    0x03
 #define MOUSE_ISINTELLIMOUSE5BUTTONS    0x04
 
-static PIRP  CurrentIrp;
-static ULONG MouseDataRead;
-static ULONG MouseDataRequired;
-static BOOLEAN AlreadyOpened = FALSE;
-static KDPC MouseDpc;
-
-static VOID MouseDpcRoutine(PKDPC Dpc,
-                         PVOID DeferredContext,
-                         PVOID SystemArgument1,
-                         PVOID SystemArgument2);
+BOOLEAN DetectPS2Port(void);
+BOOLEAN SetupMouse(PDEVICE_OBJECT DeviceObject, PUNICODE_STRING RegistryPath);
+void controller_wait(void);
index e26b29e..4327b7c 100644 (file)
 #include "mouse.h"
 #include "psaux.h"
 
+static PIRP  CurrentIrp;
+static ULONG MouseDataRead;
+static ULONG MouseDataRequired;
+static BOOLEAN AlreadyOpened = FALSE;
+
 BOOLEAN STDCALL
 MouseSynchronizeRoutine(PVOID Context)
 {
    PIRP Irp = (PIRP)Context;
-   PMOUSE_INPUT_DATA rec  = (PMOUSE_INPUT_DATA)Irp->AssociatedIrp.SystemBuffer;
    PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
    ULONG NrToRead         = stk->Parameters.Read.Length/sizeof(MOUSE_INPUT_DATA);
-   int i;
 
    if ((stk->Parameters.Read.Length/sizeof(MOUSE_INPUT_DATA))==NrToRead)
    {
@@ -237,9 +240,6 @@ NTSTATUS STDCALL
 DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
 {
    PDEVICE_OBJECT DeviceObject;
-   UNICODE_STRING DeviceName;
-   UNICODE_STRING SymlinkName;
-   PDEVICE_EXTENSION DeviceExtension;
 
    if (DetectPS2Port() == TRUE) {
      DbgPrint("PS2 Port Driver version 0.0.2\n");
index 22657b6..9881ce6 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.8 2002/06/16 04:47:56 sedwards Exp $
+# $Id: makefile,v 1.9 2003/11/14 17:13:27 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -9,6 +9,8 @@ TARGET_NAME = sermouse
 TARGET_OBJECTS = \
   sermouse.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 #mouse.o - Old Serial mouse driver
 
 include $(PATH_TO_TOP)/rules.mak
index f9c85b8..2e49833 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 2003/01/01 11:11:48 robd Exp $
+# $Id: Makefile,v 1.5 2003/11/14 17:13:28 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -10,7 +10,7 @@ TARGET_NORC = yes
 
 TARGET_CFLAGS = \
  -Wall -Winline -Os -fomit-frame-pointer -fno-strength-reduce \
- -DBZ_NO_STDIO -DBZ_DECOMPRESS_ONLY $(BIGFILES) -g
+ -DBZ_NO_STDIO -DBZ_DECOMPRESS_ONLY $(BIGFILES) -g -Werror
 
 TARGET_OBJECTS = \
        bzlib.o \
index 40b9c87..7aac87e 100644 (file)
@@ -95,7 +95,6 @@ NTSTATUS AfdDispBind(
   PFILE_REQUEST_BIND Request;
   PFILE_REPLY_BIND Reply;
   PAFDFCB FCB;
-  INT Errno;
 
   InputBufferLength  = IrpSp->Parameters.DeviceIoControl.InputBufferLength;
   OutputBufferLength = IrpSp->Parameters.DeviceIoControl.OutputBufferLength;
@@ -371,7 +370,6 @@ NTSTATUS AfdDispRecvFrom(
   UINT OutputBufferLength;
   PFILE_REQUEST_RECVFROM Request;
   PFILE_REPLY_RECVFROM Reply;
-  DWORD NumberOfBytesRecvd;
   PAFDFCB FCB;
 
   AFD_DbgPrint(MAX_TRACE, ("Called.\n"));
index 729ea22..216c86f 100644 (file)
@@ -96,7 +96,6 @@ NTSTATUS AfdEventReceiveDatagramHandler(
 {
   PAFDFCB FCB = (PAFDFCB)TdiEventContext;
   PAFD_READ_REQUEST ReadRequest;
-  PIO_STACK_LOCATION IrpSp;
   PVOID ReceiveBuffer;
   PAFD_BUFFER Buffer;
   PLIST_ENTRY Entry;
index 45a11e5..a7ac4ff 100644 (file)
@@ -89,7 +89,6 @@ AfdCreate(
     PAFD_SOCKET_INFORMATION SocketInfo;
     PFILE_FULL_EA_INFORMATION EaInfo;
     PDEVICE_EXTENSION DeviceExt;
-    PTA_ADDRESS Address;
     NTSTATUS Status;
     ULONG EaLength;
     PAFDFCB FCB;
index ce28180..1cf2d7d 100644 (file)
@@ -66,7 +66,6 @@ AfdWrite(
     PDEVICE_OBJECT DeviceObject,
     PIRP Irp)
 {
-    PDEVICE_EXTENSION DeviceExt = DeviceObject->DeviceExtension;
     PIO_STACK_LOCATION IoSp = IoGetCurrentIrpStackLocation(Irp);
     PFILE_OBJECT FileObject = IoSp->FileObject;
     NTSTATUS Status;
index 2947304..22f501b 100644 (file)
@@ -38,7 +38,6 @@ NTSTATUS MergeWSABuffers(
   ULONG MaxLength,
   PULONG BytesCopied)
 {
-  NTSTATUS Status;
   ULONG Length;
   LPWSABUF p;
   ULONG i;
@@ -84,13 +83,11 @@ NTSTATUS FillWSABuffers(
     DWORD BufferCount,
     PULONG BytesCopied)
 {
-  NTSTATUS Status;
   PUCHAR DstData, SrcData;
   UINT DstSize, SrcSize;
   UINT Count, Total;
   PAFD_BUFFER SrcBuffer;
   PLIST_ENTRY Entry;
-  ULONG Size;
 
   *BytesCopied = 0;
   if (BufferCount == 0)
index a97a278..bbb238c 100644 (file)
@@ -1088,7 +1088,6 @@ NTSTATUS TdiReceiveDatagram(
 {
     PTDI_CONNECTION_INFORMATION ReceiveInfo;
     PTDI_CONNECTION_INFORMATION ReturnInfo;
-    PTA_ADDRESS_IP ReturnAddress;
     PDEVICE_OBJECT DeviceObject;
     IO_STATUS_BLOCK Iosb;
     DWORD TdiAddressSize;
index 19db7c8..6ff2a6d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.5 2001/08/21 20:13:15 chorns Exp $
+# $Id: makefile,v 1.6 2003/11/14 17:13:28 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,7 +6,7 @@ TARGET_TYPE = driver
 
 TARGET_NAME = afd
 
-TARGET_CFLAGS = -I./include -DDBG
+TARGET_CFLAGS = -I./include -DDBG -Werror -Wall
 
 TARGET_OBJECTS = \
   afd/afd.o \
index e94d605..5e5ff73 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.11 2001/08/21 20:13:15 chorns Exp $
+# $Id: Makefile,v 1.12 2003/11/14 17:13:28 weiden Exp $
 
 PATH_TO_TOP = ../../../..
 
@@ -6,7 +6,7 @@ TARGET_TYPE = driver
 
 TARGET_NAME = ne2000
 
-TARGET_CFLAGS = -I./include
+TARGET_CFLAGS = -I./include -Werror -Wall
 
 TARGET_OBJECTS = \
   ne2000/8390.o \
index e77496d..3829cfd 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.18 2003/09/04 06:55:21 vizzini Exp $
+# $Id: Makefile,v 1.19 2003/11/14 17:13:28 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -6,7 +6,7 @@ TARGET_TYPE = export_driver
 
 TARGET_NAME = ndis
 
-TARGET_CFLAGS = -I./include -DNDIS_WRAPPER -DDBG=1 -Wall
+TARGET_CFLAGS = -I./include -DNDIS_WRAPPER -DDBG=1 -Wall -Werror
 
 TARGET_OBJECTS = \
   ndis/main.o \
index e09b4f2..42d8e05 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2003/01/08 19:55:01 robd Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:29 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -9,7 +9,7 @@ TARGET_NAME = npf
 
 #TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -I$(PATH_TO_TOP)/ntoskrnl/include
 
-TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include
+TARGET_CFLAGS = -DDBG -DWIN_NT_DRIVER -DKQPC_TS -DUSE_KLOCKS -I$(PATH_TO_TOP)/ntoskrnl/include -Wall -Werror
 
 TARGET_DDKLIBS = ndis.a
 
index a567c83..afef4f5 100644 (file)
@@ -37,6 +37,7 @@
 #include "packet.h"
 #include "win_bpf.h"
 
+#define assert(exp)     ((void)0)
 //-------------------------------------------------------------------
 
 NTSTATUS
@@ -51,8 +52,6 @@ NPF_OpenDumpFile(POPEN_INSTANCE Open , PUNICODE_STRING fileName, BOOLEAN Append)
     ULONG FullFileNameLength;
     PDEVICE_OBJECT fsdDevice;
 
-    FILE_STANDARD_INFORMATION StandardInfo;
-    
     IF_LOUD(DbgPrint("NPF: OpenDumpFile.\n");)
 
     if(fileName->Buffer[0] == L'\\' &&
@@ -158,9 +157,6 @@ NPF_StartDump(POPEN_INSTANCE Open)
     NTSTATUS ntStatus;
     struct packet_file_header hdr;
     IO_STATUS_BLOCK IoStatus;
-    NDIS_REQUEST pRequest;
-    ULONG MediaType;
-    OBJECT_ATTRIBUTES ObjectAttributes;
 
     IF_LOUD(DbgPrint("NPF: StartDump.\n");)
 
@@ -273,7 +269,6 @@ NPF_StartDump(POPEN_INSTANCE Open)
 
 VOID NPF_DumpThread(POPEN_INSTANCE Open)
 {
-    ULONG       FrozenNic;
 
     IF_LOUD(DbgPrint("NPF: In the work routine.  Parameter = 0x%0x\n",Open);)
 
@@ -315,7 +310,6 @@ NTSTATUS NPF_SaveCurrentBuffer(POPEN_INSTANCE Open)
     UINT        Ttail;
     UINT        TLastByte;
     PUCHAR      CurrBuff;
-    NTSTATUS    ntStatus;
     IO_STATUS_BLOCK IoStatus;
     PMDL        lMdl;
     UINT        SizeToDump;
@@ -467,12 +461,6 @@ NTSTATUS NPF_SaveCurrentBuffer(POPEN_INSTANCE Open)
 //-------------------------------------------------------------------
 
 NTSTATUS NPF_CloseDumpFile(POPEN_INSTANCE Open){
-    NTSTATUS    ntStatus;
-    IO_STATUS_BLOCK IoStatus;
-    PMDL        WriteMdl;
-    PUCHAR      VMBuff;
-    UINT        VMBufLen;
-
 
     IF_LOUD(DbgPrint("NPF: NPF_CloseDumpFile.\n");)
     IF_LOUD(DbgPrint("Dumpoffset=%d\n",Open->DumpOffset.QuadPart);)
@@ -542,7 +530,6 @@ VOID NPF_WriteDumpFile(PFILE_OBJECT FileObject,
     KEVENT event;
     PIO_STACK_LOCATION ioStackLocation;
     PDEVICE_OBJECT fsdDevice = IoGetRelatedDeviceObject(FileObject);
-    NTSTATUS Status;
  
     // Set up the event we'll use
     KeInitializeEvent(&event, SynchronizationEvent, FALSE);
index de4e609..0acbd0a 100644 (file)
@@ -95,16 +95,16 @@ JIT_BPF_Filter;
 
 /// mov r32,i32
 #define MOVid(r32, i32) \
-  emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
+  emitm(&stream, (11 << 4) | (1 << 3) | (r32 & 0x7), 1); emitm(&stream, i32, 4);
 
 /// mov dr32,sr32
 #define MOVrd(dr32, sr32) \
-  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
+  emitm(&stream, (8 << 4) | 3 | (1 << 3), 1); emitm(&stream,  (3 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);
 
 /// mov dr32,sr32[off]
 #define MOVodd(dr32, sr32, off) \
-  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
+  emitm(&stream, (8 << 4) | 3 | (1 << 3), 1); \
+  emitm(&stream,  (1 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);\
   emitm(&stream,  off, 1);
 
 /// mov dr32,sr32[or32]
@@ -144,15 +144,15 @@ JIT_BPF_Filter;
 
 /// push r32
 #define PUSH(r32) \
-  emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
+  emitm(&stream, (5 << 4) | (0 << 3) | (r32 & 0x7), 1);
 
 /// pop r32
 #define POP(r32) \
-  emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
+  emitm(&stream, (5 << 4) | (1 << 3) | (r32 & 0x7), 1);
 
 /// ret
 #define RET() \
-  emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
+  emitm(&stream, (12 << 4) | (0 << 3) | 3, 1);
 
 /// add dr32,sr32
 #define ADDrd(dr32, sr32) \
@@ -215,12 +215,12 @@ JIT_BPF_Filter;
 /// and dr32,sr32
 #define ANDrd(dr32, sr32) \
   emitm(&stream, 0x23, 1);\
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
+  emitm(&stream,  (3 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);
 
 /// or dr32,sr32
 #define ORrd(dr32, sr32) \
   emitm(&stream, 0x0b, 1);\
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
+  emitm(&stream,  (3 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);
 
 /// or r32,i32
 #define ORid(r32, i32) \
@@ -235,40 +235,40 @@ JIT_BPF_Filter;
 /// shl r32,i8
 #define SHLib(r32, i8) \
   emitm(&stream, 0xc1, 1);\
-  emitm(&stream, 7 << 5 | r32 & 0x7, 1);\
+  emitm(&stream, (7 << 5) | (r32 & 0x7), 1);\
   emitm(&stream, i8, 1);
 
 /// shl dr32,cl
 #define SHL_CLrb(dr32) \
   emitm(&stream, 0xd3, 1);\
-  emitm(&stream,  7 << 5 | dr32 & 0x7, 1);
+  emitm(&stream,  (7 << 5) | (dr32 & 0x7), 1);
 
 /// shr r32,i8
 #define SHRib(r32, i8) \
   emitm(&stream, 0xc1, 1);\
-  emitm(&stream, 29 << 3 | r32 & 0x7, 1);\
+  emitm(&stream, (29 << 3) | (r32 & 0x7), 1);\
   emitm(&stream, i8, 1);
 
 /// shr dr32,cl
 #define SHR_CLrb(dr32) \
   emitm(&stream, 0xd3, 1);\
-  emitm(&stream,  29 << 3 | dr32 & 0x7, 1);
+  emitm(&stream,  (29 << 3) | (dr32 & 0x7), 1);
 
 /// neg r32
 #define NEGd(r32) \
   emitm(&stream, 0xf7, 1);\
-  emitm(&stream,  27 << 3 | r32 & 0x7, 1);
+  emitm(&stream,  (27 << 3) | (r32 & 0x7), 1);
 
 /// cmp dr32,sr32[off]
 #define CMPodd(dr32, sr32, off) \
-  emitm(&stream, 3 << 4 | 3 | 1 << 3, 1); \
-  emitm(&stream,  1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
+  emitm(&stream, (3 << 4) | 3 | (1 << 3), 1); \
+  emitm(&stream,  (1 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);\
   emitm(&stream,  off, 1);
 
 /// cmp dr32,sr32
 #define CMPrd(dr32, sr32) \
   emitm(&stream, 0x3b, 1); \
-  emitm(&stream,  3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
+  emitm(&stream,  (3 << 6) | ((dr32 & 0x7) << 3) | (sr32 & 0x7), 1);
 
 /// cmp dr32,i32
 #define CMPid(dr32, i32) \
index bdb5b1a..fbf2edf 100644 (file)
@@ -80,8 +80,6 @@ NPF_Open(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
     NDIS_STATUS     Status;
     NDIS_STATUS     ErrorStatus;
     UINT            i;
-       PUCHAR                  tpointer;
-    PLIST_ENTRY     PacketListEntry;
        PCHAR                   EvName;
 
     IF_LOUD(DbgPrint("NPF: OpenAdapter\n");)
index 815ae71..4ccc318 100644 (file)
@@ -92,18 +92,8 @@ DriverEntry(
 {
 
     NDIS_PROTOCOL_CHARACTERISTICS  ProtocolChar;
-    UNICODE_STRING MacDriverName;
-    UNICODE_STRING UnicodeDeviceName;
-    PDEVICE_OBJECT DeviceObject = NULL;
-    PDEVICE_EXTENSION DeviceExtension = NULL;
     NDIS_STATUS Status = NDIS_STATUS_SUCCESS;
-    NTSTATUS ErrorCode = STATUS_SUCCESS;
     NDIS_STRING ProtoName = NDIS_STRING_CONST("PacketDriver");
-    ULONG          DevicesCreated=0;
-    PWSTR          BindString;
-    PWSTR          ExportString;
-    PWSTR          BindStringSave;
-    PWSTR          ExportStringSave;
     NDIS_HANDLE    NdisProtocolHandle;
        WCHAR* bindT;
        PKEY_VALUE_PARTIAL_INFORMATION tcpBindingsP;
@@ -297,7 +287,6 @@ RegistryError:
 
 PWCHAR getAdaptersList(void)
 {
-       PKEY_VALUE_PARTIAL_INFORMATION result = NULL;
        OBJECT_ATTRIBUTES objAttrs;
        NTSTATUS status;
        HANDLE keyHandle;
@@ -321,7 +310,6 @@ PWCHAR getAdaptersList(void)
 
     } else { //OK
                ULONG resultLength;
-               KEY_VALUE_PARTIAL_INFORMATION valueInfo;
                CHAR AdapInfo[1024];
                UINT i=0;
                
@@ -657,14 +645,10 @@ NPF_IoControl(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp)
     PINTERNAL_REQUEST   pRequest;
     ULONG               FunctionCode;
     NDIS_STATUS                Status;
-    PLIST_ENTRY         PacketListEntry;
-       UINT                            i;
        PUCHAR                          tpointer;
        ULONG                           dim,timeout;
        PUCHAR                          prog;
        PPACKET_OID_DATA    OidData;
-       int                                     *StatsBuf;
-    PNDIS_PACKET        pPacket;
        ULONG                           mode;
        PWSTR                           DumpNameBuff;
        PUCHAR                          TmpBPFProgram;
@@ -1130,7 +1114,6 @@ NPF_RequestComplete(
     PIRP                Irp;
     PINTERNAL_REQUEST   pRequest;
     UINT                FunctionCode;
-       KIRQL                           OldIrq;
 
     PPACKET_OID_DATA    OidData;
 
@@ -1249,7 +1232,6 @@ NPF_ReadRegistry(
 
     PWSTR      Bind       = L"Bind";
     PWSTR      Export     = L"Export";
-    PWSTR      Parameters = L"Parameters";
     PWSTR      Linkage    = L"Linkage";
 
     PWCHAR     Path;
index 7541744..093146f 100644 (file)
@@ -107,10 +107,7 @@ NPF_Read(IN PDEVICE_OBJECT DeviceObject,IN PIRP Irp)
        UINT                            Ttail;
        UINT                            TLastByte;
        PUCHAR                          CurrBuff;
-       LARGE_INTEGER           CapTime;
-       LARGE_INTEGER           TimeFreq;
        struct bpf_hdr          *header;
-       KIRQL                           Irql;
        PUCHAR                          UserPointer;
        ULONG                           bytecopy;
        UINT                            SizeToCopy;
@@ -339,8 +336,6 @@ NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext,IN NDIS_HANDLE MacRec
     UINT                BytesTransfered;
     ULONG               BufferLength;
     PMDL                pMdl;
-       LARGE_INTEGER           CapTime;
-       LARGE_INTEGER           TimeFreq;
        struct bpf_hdr          *header;
        PUCHAR                          CurrBuff;
        UINT                            Thead;
index 3742064..1123a65 100644 (file)
@@ -173,6 +173,7 @@ uint32 tcp_session(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_
                        break;
                }
                if (flags&ACK)
+               {
                        if (direction==session->direction)
                        {
                                uint32 new_ack=SW_ULONG_AT(mem_ex->buffer,20);
@@ -185,12 +186,14 @@ uint32 tcp_session(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_
                                if (new_ack-session->ack_cln<MAX_WINDOW)
                                        session->ack_cln=new_ack;
                        }
+               }
                if (flags&RST)
                {
                        next_status=CLOSED_RST;
                        break;
                }
                if (flags&FIN)
+               {
                        if (direction==session->direction)
                        {   /* an hack to make all things work */
                                session->ack_cln=SW_ULONG_AT(mem_ex->buffer,16);
@@ -203,6 +206,7 @@ uint32 tcp_session(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_
                                next_status=FIN_SRV_RCV;
                                break;
                        }
+               }
                next_status=ESTABLISHED;
                break;
        
index 0e42697..2152a46 100644 (file)
@@ -39,8 +39,6 @@ VOID TIME_SYNCHRONIZE(struct time_conv *data)
 {
        struct timeval tmp;
        LARGE_INTEGER SystemTime;
-       LARGE_INTEGER i;
-       ULONG tmp2;
        LARGE_INTEGER TimeFreq,PTime;
 
        if (data->reference!=0)
@@ -73,7 +71,6 @@ void FORCE_TIME(struct timeval *src, struct time_conv *dest)
 void GET_TIME(struct timeval *dst, struct time_conv *data)
 {
        LARGE_INTEGER PTime, TimeFreq;
-       LONG tmp;
 
        PTime=KeQueryPerformanceCounter(&TimeFreq);
 #ifndef __GNUC__
@@ -96,7 +93,6 @@ void GET_TIME(struct timeval *dst, struct time_conv *data)
 /* callers must be at IRQL=PASSIVE_LEVEL */
 VOID TIME_SYNCHRONIZE(struct time_conv *data)
 {
-       struct timeval tmp;
        LARGE_INTEGER system_time;
        ULONGLONG curr_ticks;
        KIRQL old;
index c3c5eb5..291474d 100644 (file)
@@ -148,14 +148,12 @@ NPF_BufferedWrite(
     POPEN_INSTANCE             Open;
     PIO_STACK_LOCATION IrpSp;
     PNDIS_PACKET               pPacket;
-       UINT                            i;
     NDIS_STATUS                    Status;
-       LARGE_INTEGER           StartTicks, CurTicks, TargetTicks;
+       LARGE_INTEGER           StartTicks, CurTicks;
        LARGE_INTEGER           TimeFreq;
        struct timeval          BufStartTime;
        struct sf_pkthdr        *winpcap_hdr;
        PMDL                            TmpMdl;
-       PCHAR                           CurPos;
        PCHAR                           EndOfUserBuff = UserBuff + UserBuffSize;
        
     IF_LOUD(DbgPrint("NPF: BufferedWrite, UserBuff=%x, Size=%u\n", UserBuff, UserBuffSize);)
index d43692b..b204812 100644 (file)
@@ -1,9 +1,11 @@
-# $Id: Makefile,v 1.13 2001/08/21 20:13:16 chorns Exp $
+# $Id: Makefile,v 1.14 2003/11/14 17:13:29 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
 TARGET_TYPE = export_driver
 
+TARGET_CFLAGS = -Werror -Wall
+
 TARGET_NAME = tdi
 
 TARGET_OBJECTS = \
index a1601ad..84be227 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: dereg.c,v 1.5 2003/07/10 19:54:13 chorns Exp $
+/* $Id: dereg.c,v 1.6 2003/11/14 17:13:29 weiden Exp $
  *
  */
 #include <ntos.h>
@@ -46,8 +46,8 @@ TdiRegisterAddressChangeHandler (
        DWORD   Unknown2
        )
 {
-       NTSTATUS        Status = STATUS_SUCCESS;
 #if 0  
+       NTSTATUS        Status = STATUS_SUCCESS;
        Status = TdiDeRegister (
                        R_ADDRESS_CHANGE_HANDLER,
                        AddressChangeHandler
@@ -85,8 +85,8 @@ TdiRegisterDeviceObject (
        DWORD   Unknown1
        )
 {
-       NTSTATUS        Status = STATUS_SUCCESS;
 #if 0  
+       NTSTATUS        Status = STATUS_SUCCESS;
        Status = TdiDeRegister (
                        R_DEVICE_OBJECT,
                        DeviceObject
@@ -124,8 +124,8 @@ TdiRegisterNetAddress (
        DWORD   Unknown1
        )
 {
-       NTSTATUS        Status = STATUS_SUCCESS;
 #if 0  
+       NTSTATUS        Status = STATUS_SUCCESS;
        Status = TdiDeRegister (
                        R_NET_ADDRESS,
                        NetAddress
@@ -164,8 +164,8 @@ TdiRegisterNotificationHandler (
        DWORD   Unknown2
        )
 {
-       NTSTATUS        Status = STATUS_SUCCESS;
 #if 0  
+       NTSTATUS        Status = STATUS_SUCCESS;
        Status = TdiDeRegister (
                        R_NOTIFICATION_HANDLER,
                        NotificationHandler
index 50ce2a7..b4b6fc6 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.9 2002/09/08 10:22:21 chorns Exp $
+# $Id: makefile,v 1.10 2003/11/14 17:13:29 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -8,7 +8,7 @@ TARGET_NAME = wshtcpip
 
 TARGET_BASE = 0x777c0000
 
-TARGET_CFLAGS = -DUNICODE
+TARGET_CFLAGS = -DUNICODE -Werror -Wall
 
 TARGET_SDKLIBS = ntdll.a kernel32.a ws2_32.a
 
index 94d60cf..35a1001 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.3 2002/09/08 10:22:24 chorns Exp $
+# $Id: Makefile,v 1.4 2003/11/14 17:13:29 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -6,7 +6,7 @@ TARGET_TYPE = driver_library
 
 TARGET_ASFLAGS = -D__NTHAL__ -I$(PATH_TO_TOP)/ntoskrnl/include
 
-TARGET_CFLAGS = -D__NTHAL__ -I$(PATH_TO_TOP)/ntoskrnl/include
+TARGET_CFLAGS = -D__NTHAL__ -I$(PATH_TO_TOP)/ntoskrnl/include -Werror -Wall
 
 TARGET_NAME = hal
 
index 9c28f85..1d2a5fd 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.11 2002/08/26 13:06:02 dwelch Exp $
+# $Id: makefile,v 1.12 2003/11/14 17:13:29 weiden Exp $
 #
 # ReactOS Operating System
 #
@@ -25,6 +25,8 @@ CLEAN_FILES = $(TARGETNAME)$(EXE_POSTFIX) $(SVC_FILES)
 
 BASE_CFLAGS = -I../../include
 
+CFLAGS += -Wall -Werror
+
 all: $(SVC_FILES)
 
 $(TARGETNAME)$(EXE_POSTFIX): $(TARGETNAME).c
index ad281f7..b5f8187 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.12 2001/07/15 21:18:54 rex Exp $
+# $Id: makefile,v 1.13 2003/11/14 17:13:30 weiden Exp $
 #
 # ReactOS Operating System
 #
@@ -30,7 +30,7 @@ $(NAPI_FILES): $(SYSTEM_CALLS_DB) $(TARGET)$(EXE_POSTFIX)
 
 # (rjj) i removed the following option from line below: -If:\gnu\mingw32\include
 $(TARGET)$(EXE_POSTFIX): $(TARGET).c
-       $(HOST_CC) -g $(TARGET).c -o $(TARGET)$(EXE_POSTFIX)    
+       $(HOST_CC) -g -Wall -Werror $(TARGET).c -o $(TARGET)$(EXE_POSTFIX) 
 
 clean:
        - $(RM) $(TARGET)$(EXE_POSTFIX) $(NTDLL_STUBS) $(KERNEL_SERVICE_TABLE) $(KERNEL_ZW_CALLS)
index d3afbd9..98b3acc 100644 (file)
  *  DISCLAIMED. This includes but is not limited to warranties of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  *
- * $Revision: 1.4 $
- * $Author: robd $
- * $Date: 2002/11/24 18:06:00 $
+ * $Revision: 1.5 $
+ * $Author: weiden $
+ * $Date: 2003/11/14 17:13:30 $
  *
  */
 
 #ifndef _WCHAR_H_
 #define _WCHAR_H_
 
+#define WCHAR_MIN      0
+#define WCHAR_MAX      ((wchar_t)-1)
 
 #include <msvcrt/ctype.h>
 #include <msvcrt/stdio.h>
index 996aa42..b480e72 100644 (file)
@@ -1,5 +1,5 @@
 #include <windows.h>
-
+#include <msvcrt\stdio.h>
 
 #ifdef __GNUC__
 
@@ -10,6 +10,7 @@ int _abnormal_termination(void)
 {
        printf("Abnormal Termination\n");
 //     return AbnormalTermination();
+        return 0;
 }
 
 #else
index a2b1083..c1dd314 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.61 2003/08/07 04:03:22 royce Exp $
+# $Id: makefile,v 1.62 2003/11/14 17:13:30 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -14,7 +14,7 @@ TARGET_BASE = 0x77630000
 
 TARGET_LFLAGS = -nostartfiles
 
-TARGET_CFLAGS = -D_MSVCRT_LIB_
+TARGET_CFLAGS = -D_MSVCRT_LIB_ -Werror -Wall
 
 # require os code to explicitly request A/W version of structs/functions
 TARGET_CFLAGS += -D_DISABLE_TIDENTS
index cc52fba..b7dc04b 100644 (file)
@@ -10,6 +10,7 @@
 #include <msvcrt/process.h>
 #include <msvcrt/ctype.h>
 #include <msvcrt/io.h>
+#include <msvcrt/internal/file.h>
 
 
 #ifndef F_OK
index e65a7e7..aaff4a9 100644 (file)
@@ -11,4 +11,5 @@ int _XcptFilter (
 {
        //fixme XcptFilter
 //     return UnhandledExceptionFilter(ExceptionInfo);
+        return 0;
 }
index 278f842..fe46c21 100644 (file)
@@ -4,7 +4,7 @@
 #include <msvcrt/fcntl.h>
 #include <msvcrt/io.h>
 #include <msvcrt/errno.h>
-
+#include <msvcrt/internal/file.h>
 
 /*
  * @implemented
index 1cee69f..1eec193 100644 (file)
@@ -10,8 +10,6 @@ int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31};
 unsigned int _getsystime(struct tm* tp)
 {
     SYSTEMTIME Time;
-    TIME_ZONE_INFORMATION TimeZoneInformation;
-    DWORD TimeZoneId;
     int i;
 
     GetLocalTime(&Time);
index 02b9f05..13a02f8 100644 (file)
@@ -7,7 +7,7 @@ TARGET_NAME = d3d8thk
 #TARGET_BASE = 0x76340000
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
 
 TARGET_SDKLIBS = ntdll.a winedbgc.a
 
index 114259b..3e22a93 100644 (file)
@@ -12,6 +12,7 @@
 #include <windows.h>
 #include <tchar.h>
 #include <time.h>
+#include <stdlib.h>
 
 #include <winsock2.h>
 #include <iptypes.h>
@@ -328,10 +329,11 @@ GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable, PULONG pOutBufLen)
                 errCode = RegQueryValueExW(hKey, L"Bind", NULL, NULL, (LPBYTE)pData, &dwSize);
                 if (errCode == ERROR_SUCCESS) {
                     wchar_t* pStr = pData;
-                    for (i = 0; i < pIfTable->NumAdapters, *pStr != L'\0'; pStr += wcslen(pStr) + 1) {
+                    for (i = 0; i < pIfTable->NumAdapters && *pStr != L'\0'; pStr += wcslen(pStr) + 1) {
                         if (wcsstr(pStr, L"\\Device\\NdisWanIp") == 0) {
                             wcsncpy(pIfTable->Adapter[i].Name, pStr, MAX_ADAPTER_NAME);
-                            pIfTable->Adapter[i].Index = i++;
+                            pIfTable->Adapter[i].Index = i;
+                                                       i++;
                         }
                     }
 
index d1ef62e..d7d3808 100644 (file)
@@ -11,7 +11,7 @@ TARGET_BASE = 0x777c0000
 TARGET_CFLAGS = -DUNICODE -D_UNICODE
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror
 
 TARGET_SDKLIBS = ntdll.a kernel32.a
 
index 979a2f5..c7f4b9d 100644 (file)
@@ -9,7 +9,7 @@ TARGET_BASE = 0x69cc0000
 TARGET_CFLAGS = -fno-builtin -D__USE_W32API
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -DUNICODE -D_UNICODE
+TARGET_CFLAGS += -DUNICODE -D_UNICODE -Wall -Werror
 
 TARGET_LFLAGS = -nostdlib -nostartfiles
 
index e3f8aab..d30dfd5 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.39 2003/08/07 04:03:23 royce Exp $
+# $Id: Makefile,v 1.40 2003/11/14 17:13:30 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -16,7 +16,7 @@ TARGET_SDKLIBS = string.a kernel32.a ntdll.a
 
 TARGET_GCCLIBS = gcc
 
-TARGET_CFLAGS = -D_MSVCRT_LIB_
+TARGET_CFLAGS = -D_MSVCRT_LIB_ -Werror -Wall
 
 # require os code to explicitly request A/W version of structs/functions
 TARGET_CFLAGS += -D_DISABLE_TIDENTS
index 996aa42..515d780 100644 (file)
@@ -1,5 +1,5 @@
 #include <windows.h>
-
+#include <stdio.h>
 
 #ifdef __GNUC__
 
@@ -10,6 +10,7 @@ int _abnormal_termination(void)
 {
        printf("Abnormal Termination\n");
 //     return AbnormalTermination();
+        return 0;
 }
 
 #else
index 3cebce4..5c255f5 100644 (file)
@@ -60,9 +60,14 @@ typedef struct __JUMP_BUFFER
     unsigned long UnwindData[6];
 } _JUMP_BUFFER;
 
+void
+_local_unwind2(MSVCRT_EXCEPTION_FRAME *RegistrationFrame,
+                     LONG TryLevel);
+
 /*
  * @implemented
 */
+
 void __stdcall _seh_longjmp_unwind(_JUMP_BUFFER *jmp)
 {
     _local_unwind2((MSVCRT_EXCEPTION_FRAME*) jmp->Registration, jmp->TryLevel);
index c01b91a..41bf69b 100644 (file)
@@ -10,5 +10,6 @@ _XcptFilter(DWORD ExceptionCode,
 {
        //fixme XcptFilter
 //     return UnhandledExceptionFilter(ExceptionInfo);
+       return 0;
 }
 
index 7f232e8..01d2d09 100644 (file)
@@ -10,6 +10,7 @@
 #include <windows.h>
 #include <msvcrt/io.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/string.h>
 #include <msvcrt/internal/file.h>
 
 #define NDEBUG
index 6179c2d..f30cb10 100644 (file)
@@ -7,11 +7,13 @@ unsigned char * _mbsrev(unsigned char *s)
 {
        unsigned char  *e;
        unsigned char  a;
+       unsigned char  *e2;
        e=s;
        while (*e) {
                if ( _ismbblead(*e) ) {
                        a = *e;
-                       *e = *++e;
+                       e2 = e;
+                       *e2 = *++e;
                        if ( *e == 0 )
                                break;
                        *e = a;
index 61cec9e..a0e3af1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: cpp.c,v 1.4 2003/10/05 18:13:26 navaraf Exp $
+/* $Id: cpp.c,v 1.5 2003/11/14 17:13:31 weiden Exp $
  *
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS C runtime
@@ -16,6 +16,8 @@
 #include <windows.h>
 #include <msvcrt/internal/tls.h>
 #include <msvcrt/stddef.h>
+#include <msvcrt/stdlib.h>
+#include <msvcrt/string.h>
 
 #define CXX_FRAME_MAGIC    0x19930520
 #define CXX_EXCEPTION      0xe06d7363
@@ -157,7 +159,7 @@ inline static void call_dtor( void *func, void *object )
     __asm__ __volatile__("call *%0" : : "r" (func), "c" (object) : "eax", "edx", "memory" );
 }
 
-
+#if 0
 static void dump_type( cxx_type_info *type )
 {
 #if 0
@@ -215,7 +217,7 @@ static void dump_function_descr( cxx_function_descr *descr, cxx_exception_type *
     }
 #endif
 }
-
+#endif
 /* compute the this pointer for a base class of a given type */
 static void *get_this_pointer( cxx_type_info *type, void *object )
 {
index edc0c31..ddf46d1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: environ.c,v 1.4 2003/07/11 21:58:09 royce Exp $
+/* $Id: environ.c,v 1.5 2003/11/14 17:13:31 weiden Exp $
  *
  * dllmain.c
  *
@@ -8,6 +8,7 @@
 #include <windows.h>
 #include <msvcrt/internal/tls.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/string.h>
 
 #define NDEBUG
 #include <msvcrt/msvcrtdbg.h>
index 9d5c7d5..335729c 100644 (file)
@@ -27,6 +27,7 @@ typedef int (* _onexit_t)(void);
  */
 _onexit_t __dllonexit(_onexit_t func, void (** fStart[])(void),        void (** fEnd[])(void))
 {
+       return 0;
 }
 
 /*
index f23aaef..6add622 100644 (file)
@@ -1,9 +1,10 @@
-/* $Id: thread.c,v 1.7 2003/07/16 02:45:24 royce Exp $
+/* $Id: thread.c,v 1.8 2003/11/14 17:13:31 weiden Exp $
  *
  */
 #include <windows.h>
 #include <msvcrt/errno.h>
 #include <msvcrt/process.h>
+#include <msvcrt/internal/file.h>
 
 
 /*
index 01b3bc2..35671e6 100644 (file)
@@ -1,9 +1,10 @@
-/* $Id: threadx.c,v 1.4 2003/07/16 02:45:24 royce Exp $
+/* $Id: threadx.c,v 1.5 2003/11/14 17:13:31 weiden Exp $
  *
  */
 #include <windows.h>
 #include <msvcrt/errno.h>
 #include <msvcrt/process.h>
+#include <msvcrt/internal/file.h>
 
 
 /*
index 35656b3..0c8855c 100644 (file)
@@ -692,7 +692,7 @@ int __vfprintf(FILE *f, const char *fmt, va_list args)
 {
        int len;
        ULONGLONG num;
-       int i, base;
+       int base;
        long double _ldouble;
        double _double;
        const char *s;
index 6f691d2..545ec63 100644 (file)
@@ -682,7 +682,7 @@ int __vfwprintf(FILE *f, const wchar_t *fmt, va_list args)
 {
        int len;
        ULONGLONG num;
-       int i, base;
+       int base;
        long double _ldouble;
        double _double;
        const char *s;
index d566d73..f50cfb9 100644 (file)
@@ -1,5 +1,7 @@
 #include <windows.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/stdio.h>
+#include <msvcrt/string.h>
 
 #if 1
 /*
index 0ae10c9..40262d5 100644 (file)
@@ -3,6 +3,7 @@
 #include <msvcrt/ctype.h>
 #include <msvcrt/errno.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/internal/file.h>
 
 
 /*
index 63ee96a..59fbe38 100644 (file)
@@ -3,6 +3,7 @@
 #include <msvcrt/ctype.h>
 #include <msvcrt/errno.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/internal/file.h>
 
 /*
  * Convert a string to an unsigned long integer.
index 41e4b17..3f601e1 100644 (file)
@@ -1,4 +1,5 @@
 #include <msvcrt/stdlib.h>
+#include <msvcrt/ctype.h>
 
 
 /*
index 6cb1e32..c0b5d99 100644 (file)
@@ -29,7 +29,7 @@
 
 static const wchar_t encoding_mask[] =
 {
-  ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff
+  (wchar_t)~0x7ff, (wchar_t)~0xffff, (wchar_t)~0x1fffff, (wchar_t)~0x3ffffff
 };
 
 static const unsigned char encoding_byte[] =
@@ -87,14 +87,6 @@ __wcrtomb (char *s, wchar_t wc)
       wc = L'\0';
     }
 
-  /* Store the UTF8 representation of WC.  */
-  if (wc < 0 || wc > 0x7fffffff)
-    {
-      /* This is no correct ISO 10646 character.  */
-      __set_errno (EILSEQ);
-      return (size_t) -1;
-    }
-
   if (wc < 0x80)
     {
       /* It's a one byte sequence.  */
index 1ba1e0f..06054ee 100644 (file)
@@ -20,7 +20,7 @@
 #include <msvcrt/wchar.h>
 
 #include <msvcrt/errno.h>
-#include <msvcrt/wchar.h>
+#include <msvcrt/internal/file.h>
 
 #ifndef EILSEQ
 #define EILSEQ EINVAL
@@ -29,7 +29,7 @@
 
 static const wchar_t encoding_mask[] =
 {
-  ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff
+  (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX)
 };
 
 static const unsigned char encoding_byte[] =
@@ -94,12 +94,14 @@ __wcsrtombs (char *dst, const wchar_t **src, size_t len, mbstate_t *ps)
     {
       wchar_t wc = *run++;
 
-      if (wc < 0 || wc > 0x7fffffff)
+#if 0
+      if (wc < 0 || wc > WCHAR_MAX)
         {
           /* This is no correct ISO 10646 character.  */
           __set_errno (EILSEQ);
           return (size_t) -1;
         }
+#endif
 
       if (wc == L'\0')
         {
index f2831df..54a3096 100644 (file)
@@ -3,6 +3,7 @@
 #include <msvcrt/ctype.h>
 #include <msvcrt/errno.h>
 #include <msvcrt/stdlib.h>
+#include <msvcrt/internal/file.h>
 
 /*
  * Convert a unicode string to an unsigned long integer.
index 8f0264b..72292c8 100644 (file)
@@ -23,6 +23,8 @@
 
 #include <windows.h>
 #include <net/ntddndis.h>
+#include <string.h>
+#include <stdlib.h>
 
 #include <packet32.h>
 #include "trace.h"
@@ -1286,12 +1288,12 @@ BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s)
 */
 BOOLEAN PacketRequest(LPADAPTER  AdapterObject,BOOLEAN Set,PPACKET_OID_DATA  OidData)
 {
-       DWORD BytesReturned;
+       //DWORD BytesReturned;
     BOOLEAN Result;
-
-    Result=DeviceIoControl(AdapterObject->hFile,(DWORD) Set ? pBIOCSETOID : pBIOCQUERYOID,
+       /*commented out since its broken & needs fixing*/
+    /*Result=DeviceIoControl(AdapterObject->hFile,(DWORD) Set ? pBIOCSETOID : pBIOCQUERYOID,
                            OidData,sizeof(PACKET_OID_DATA)-1+OidData->Length,OidData,
-                           sizeof(PACKET_OID_DATA)-1+OidData->Length,&BytesReturned,NULL);
+                           sizeof(PACKET_OID_DATA)-1+OidData->Length,&BytesReturned,NULL);*/
     
        // output some debug info
        ODSEx("PacketRequest, OID=%d ", OidData->Oid);
index 63357d1..d5d16de 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.4 2003/01/15 20:05:52 robd Exp $
+# $Id: makefile,v 1.5 2003/11/14 17:13:31 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -8,7 +8,7 @@ TARGET_NAME = packet
 
 TARGET_BASE = 0x77780000
 
-TARGET_CFLAGS = -I./include -DUNICODE -D_UNICODE -DLE -DDBG -D_DEBUG
+TARGET_CFLAGS = -I./include -DUNICODE -D_UNICODE -DLE -DDBG -D_DEBUG -Wall -Werror
 
 TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
index 8104ebc..a332387 100644 (file)
@@ -10,7 +10,7 @@
 #ifdef _DEBUG
 
 #undef THIS_FILE
-static char THIS_FILE[] = __FILE__;
+//static char THIS_FILE[] = __FILE__;
 
 void _DebugBreak(void)
 {
@@ -36,10 +36,10 @@ void Assert(void* assert, const char* file, int line, void* msg)
 {
     if (msg == NULL) {
         printf("ASSERT -- %s occured on line %u of file %s.\n",
-               assert, line, file);
+               (CHAR *)assert, line, file);
     } else {
         printf("ASSERT -- %s occured on line %u of file %s: Message = %s.\n",
-               assert, line, file, msg);
+               (CHAR *)assert, line, file, (CHAR *)msg);
     }
 }
 
index f7c4ec6..51b3201 100644 (file)
@@ -7,7 +7,7 @@ TARGET_NAME = riched32
 TARGET_BASE = 0x76340000
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -DWM_ALTTABACTIVE=0x0029 -D_DISABLE_TIDENTS -D__USE_W32API
+TARGET_CFLAGS += -DWM_ALTTABACTIVE=0x0029 -D_DISABLE_TIDENTS -D__USE_W32API -Werror -Wall
 
 TARGET_SDKLIBS = ntdll.a winedbgc.a
 
index 81a8091..6671820 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.4 2003/08/07 04:03:24 royce Exp $
+# $Id: Makefile,v 1.5 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -14,7 +14,7 @@ TARGET_NAME = winedbgc
 TARGET_CFLAGS = -D__NTDLL__
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Werror -Wall
 
 TARGET_LFLAGS = -Wl,--file-alignment,0x1000 \
   -Wl,--section-alignment,0x1000 \
index 60d88de..232988e 100644 (file)
@@ -29,7 +29,9 @@
 #include <windows.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include "porting.h"
+#include "wine/debug.h"
 /*
 #include "config.h"
 #include "wine/port.h"
@@ -40,7 +42,6 @@
 #include <string.h>
 #include <ctype.h>
 
-#include "wine/debug.h"
 #include "wine/library.h"
 #include "wine/unicode.h"
  */
@@ -258,7 +259,7 @@ static const char *default_dbgstr_an( const char *str, int n )
     {
         if (!str) return "(null)";
         res = get_tmp_space( 6 );
-        sprintf( res, "#%04x", LOWORD(str) );
+        sprintf( res, "#%04x", LOWORD((DWORD)str) );
         return res;
     }
     if (n == -1) n = strlen(str);
@@ -309,7 +310,7 @@ static const char *default_dbgstr_wn( const WCHAR *str, int n )
     {
         if (!str) return "(null)";
         res = get_tmp_space( 6 );
-        sprintf( res, "#%04x", LOWORD(str) );
+        sprintf( res, "#%04x", LOWORD((DWORD)str) );
         return res;
     }
     if (n == -1) n = strlenW(str);
index c1e8705..9049a50 100644 (file)
@@ -40,7 +40,7 @@ void _DebugBreak(void)
     DebugBreak();
 }
 
-void Trace(TCHAR* lpszFormat, ...)
+void Trace(const TCHAR* lpszFormat, ...)
 {
     va_list args;
     int nBuf;
@@ -76,7 +76,7 @@ void Assert(void* assert, TCHAR* file, int line, void* msg)
 
 //inline void Trace(TCHAR* lpszFormat, ...) { };
 //inline void Assert(void* assert, TCHAR* file, int line, void* msg) { };
-void Trace(TCHAR* lpszFormat, ...) { };
+void Trace(const TCHAR* lpszFormat, ...) { };
 void Assert(void* assert, TCHAR* file, int line, void* msg) { };
 
 #endif //_DEBUG
index 2f1defe..ea9cc34 100644 (file)
@@ -44,7 +44,7 @@
 //=============================================================================
 
 void Assert(void* assert, TCHAR* file, int line, void* msg);
-void Trace(TCHAR* lpszFormat, ...);
+void Trace(const TCHAR* lpszFormat, ...);
 void Trace1(int code, TCHAR* lpszFormat, ...);
 
 #else   // _DEBUG
@@ -55,7 +55,7 @@ void Trace1(int code, TCHAR* lpszFormat, ...);
 #endif
 
 void Assert(void* assert, TCHAR* file, int line, void* msg);
-void Trace(TCHAR* lpszFormat, ...);
+void Trace(const TCHAR* lpszFormat, ...);
 
 #endif // !_DEBUG
 
index bf203b7..185ef80 100644 (file)
@@ -249,7 +249,7 @@ int wine_dbg_log(enum __DEBUG_CLASS cls, const char *channel,
 
     va_start(valist, format);
     if (TRACE_ON(winedbgc))
-        ret = wine_dbg_printf("%08lx:", NtCurrentTeb()->Cid.UniqueThread);
+        ret = wine_dbg_printf("%08lx:", (DWORD)NtCurrentTeb()->Cid.UniqueThread);
     if (cls < __DBCL_COUNT)
         ret += wine_dbg_printf("%s:%s:%s ", classes[cls], channel + 1, function);
     if (format)
index 8273668..a7bdf95 100644 (file)
@@ -8,8 +8,6 @@ static char * const debug_channels[4] =
     __wine_dbch_winedbgc
 };
 
-static void *debug_registration;
-
 #ifdef __GNUC__
 static void __wine_dbg_winedbgc32_init(void) __attribute__((constructor));
 static void __wine_dbg_winedbgc32_fini(void) __attribute__((destructor));
index 7313084..e992996 100644 (file)
@@ -822,7 +822,7 @@ MmUnlockPage(PHYSICAL_ADDRESS PhysicalAddress)
    ULONG Start = PhysicalAddress.u.LowPart / PAGE_SIZE;
    KIRQL oldIrql;
    
-   DPRINT("MmUnlockPage(PhysicalAddress %llx)\n", PhysicalAddress);
+   DPRINT("MmUnlockPage(PhysicalAddress %I64x)\n", PhysicalAddress);
    
    if (PhysicalAddress.u.LowPart == 0)
      {
index 4126ad8..574b32d 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: eventlog.c,v 1.5 2003/08/28 13:38:23 gvg Exp $
+/* $Id: eventlog.c,v 1.6 2003/11/14 17:13:32 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -32,6 +32,7 @@
 #define NTOS_MODE_USER
 #include <ntos.h>
 #include <windows.h>
+#include <stdio.h>
 
 #include "eventlog.h"
 
@@ -75,7 +76,7 @@ ServiceMain(DWORD argc, LPTSTR *argv)
 int
 main(int argc, char *argv[])
 {
-  SERVICE_TABLE_ENTRY ServiceTable[2] = {{L"EventLog", ServiceMain},
+  SERVICE_TABLE_ENTRY ServiceTable[2] = {{L"EventLog", (LPSERVICE_MAIN_FUNCTION)ServiceMain},
                                         {NULL, NULL}};
 
   HANDLE hEvent;
index dd60ed7..67672cd 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: logport.c,v 1.4 2002/09/08 10:23:44 chorns Exp $
+/* $Id: logport.c,v 1.5 2003/11/14 17:13:32 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -176,7 +176,7 @@ StartPortThread(VOID)
 
   PortThreadHandle = CreateThread(NULL,
                                  0x1000,
-                                 PortThreadRoutine,
+                                 (LPTHREAD_START_ROUTINE)PortThreadRoutine,
                                  NULL,
                                  0,
                                  &ThreadId);
index bb5bff4..9d9354a 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2002/06/25 21:10:14 ekohl Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o logport.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index dfcad6a..77ee86f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2002/06/25 21:11:11 ekohl Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a advapi32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o endpoint.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 145946a..c72c529 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: rpcss.c,v 1.3 2002/09/08 10:23:44 chorns Exp $
+/* $Id: rpcss.c,v 1.4 2003/11/14 17:13:32 weiden Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -32,6 +32,8 @@
 #define NTOS_MODE_USER
 #include <ntos.h>
 #include <windows.h>
+#include <stdio.h>
+#include "rpcss.h"
 
 //#include "services.h"
 
@@ -83,7 +85,6 @@ int main(int argc, char *argv[])
 #endif
 
   HANDLE hEvent;
-  NTSTATUS Status;
 
   PrintString("RpcSs service\n");
 
index 4bf62c6..c2f03cf 100644 (file)
@@ -6,4 +6,5 @@ StartEndpointMapper(VOID);
 
 #endif /* __RPCSS_H__ */
 
-/* EOF */
\ No newline at end of file
+/* EOF */
+
index 92f1fc2..ec01d8f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.2 2003/08/07 04:03:24 royce Exp $
+# $Id: makefile,v 1.3 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -11,7 +11,7 @@ TARGET_NAME = ntvdm
 TARGET_INSTALLDIR = system32
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror
 
 TARGET_SDKLIBS = ntdll.a kernel32.a user32.a gdi32.a advapi32.a
 
index 935782c..fc38cdf 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ntvdm.c,v 1.3 2003/08/07 04:03:24 royce Exp $
+/* $Id: ntvdm.c,v 1.4 2003/11/14 17:13:32 weiden Exp $
  * 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -204,7 +204,6 @@ CreateVDM(PVDM_CONTROL_BLOCK vdm)
 //    BOOL result = TRUE;
     SYSTEM_INFO inf;
     MEMORYSTATUS stat;
-       PVOID lpMem = NULL;
 
     GlobalMemoryStatus(&stat);
     if (stat.dwLength != sizeof(MEMORYSTATUS)) {
@@ -271,9 +270,7 @@ WinMain(HINSTANCE hInstance,  HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nSho
 {
     VDM_CONTROL_BLOCK VdmCB;
     DWORD Result;
-    BOOL Success;
     ULONG i;
-    NTSTATUS Status;
     BOOL vdmStarted = FALSE;
 
     WCHAR WelcomeMsg[] = L"ReactOS Virtual DOS Machine support.\n";
index c8d1eaa..d56364e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: init.c,v 1.50 2003/08/11 18:50:12 chorns Exp $
+/* $Id: init.c,v 1.51 2003/11/14 17:13:32 weiden Exp $
  *
  * init.c - Session Manager initialization
  * 
@@ -811,7 +811,6 @@ InitSessionManager(HANDLE Children[])
   NTSTATUS Status;
   UNICODE_STRING UnicodeString;
   OBJECT_ATTRIBUTES ObjectAttributes;
-  UNICODE_STRING CmdLineW;
   PRTL_USER_PROCESS_PARAMETERS ProcessParameters;
   RTL_PROCESS_INFO ProcessInfo;
   HANDLE CsrssInitEvent;
index 5afb362..98f45a2 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.10 2003/08/07 04:03:24 royce Exp $
+# $Id: makefile,v 1.11 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -13,7 +13,7 @@ TARGET_INSTALLDIR = system32
 TARGET_CFLAGS = -D__NTAPP__
 
 # require os code to explicitly request A/W version of structs/functions
-TARGET_CFLAGS += -D_DISABLE_TIDENTS
+TARGET_CFLAGS += -D_DISABLE_TIDENTS -Wall -Werror
 
 TARGET_OBJECTS = $(TARGET_NAME).o init.o smapi.o
 
index f4577d0..c48f4fa 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2002/05/24 07:51:01 ekohl Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -10,7 +10,7 @@ TARGET_NAME = autochk
 
 TARGET_INSTALLDIR = system32
 
-TARGET_CFLAGS = -D__NTAPP__
+TARGET_CFLAGS = -D__NTAPP__ -Wall -Werror
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
index 6df79a5..d887e6b 100755 (executable)
@@ -2,6 +2,7 @@
 // Systems Internals
 // http://www.sysinternals.com
 #include <stdio.h>
+#include <string.h>
 #define NTOS_MODE_USER
 #include <ntos.h>
 #include <fmifs.h>
@@ -53,7 +54,7 @@ SIZEDEFINITION LegalSizes[] = {
 //----------------------------------------------------------------------
 void PrintWin32Error( PWCHAR Message, DWORD ErrorCode )
 {
-       LPVOID lpMsgBuf;
+       LPWSTR lpMsgBuf;
  
        FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                                        NULL, ErrorCode, 
@@ -179,7 +180,6 @@ BOOL __stdcall FormatExCallback( CALLBACKCOMMAND Command, DWORD Modifier, PVOID
        PDWORD percent;
        PTEXTOUTPUT output;
        PBOOLEAN status;
-       static createStructures = FALSE;
 
        // 
        // We get other types of commands, but we don't have to pay attention to them
@@ -188,7 +188,7 @@ BOOL __stdcall FormatExCallback( CALLBACKCOMMAND Command, DWORD Modifier, PVOID
 
        case PROGRESS:
                percent = (PDWORD) Argument;
-               printf("%d percent completed.\r", *percent);
+               printf("%lu percent completed.\r", *percent);
                break;
 
        case OUTPUT:
@@ -204,6 +204,21 @@ BOOL __stdcall FormatExCallback( CALLBACKCOMMAND Command, DWORD Modifier, PVOID
                        Error = TRUE;
                }
                break;
+       case DONEWITHSTRUCTURE:
+       case UNKNOWN2:
+       case UNKNOWN3:
+       case UNKNOWN4:
+       case UNKNOWN5:
+       case INSUFFICIENTRIGHTS:
+       case UNKNOWN7:
+       case UNKNOWN8:
+       case UNKNOWN9:
+       case UNKNOWNA:
+       case UNKNOWNC:
+       case UNKNOWND:
+       case STRUCTUREPROGRESS:
+               printf("Operation Not Supported");
+               return FALSE;
        }
        return TRUE;
 }
@@ -385,7 +400,7 @@ media = FMIFS_HARDDISK;
                
                if( totalNumberOfBytes.QuadPart > 1024*1024*10 ) {
                        
-                       printf("Verifying %dM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
+                       printf("Verifying %luM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
                        
                } else {
 
@@ -396,7 +411,7 @@ media = FMIFS_HARDDISK;
 
                if( totalNumberOfBytes.QuadPart > 1024*1024*10 ) {
                        
-                       printf("QuickFormatting %dM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
+                       printf("QuickFormatting %luM\n", (DWORD) (totalNumberOfBytes.QuadPart/(1024*1024)));
                        
                } else {
 
@@ -476,8 +491,8 @@ media = FMIFS_HARDDISK;
                PrintWin32Error( L"Could not query volume", GetLastError());
                return -1;
        }
-       printf("\nVolume Serial Number is %04X-%04X\n", serialNumber >> 16,
-                                       serialNumber & 0xFFFF );
+       printf("\nVolume Serial Number is %04X-%04X\n", (unsigned int)(serialNumber >> 16),
+                                       (unsigned int)(serialNumber & 0xFFFF) );
                        
        return 0;
 }
index 9044e2d..3cd53a7 100755 (executable)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/04/05 23:17:22 chorns Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,6 +12,8 @@ TARGET_SDKLIBS = ntdll.a fmifs.a
 
 TARGET_NAME = format
 
+TARGET_CFLAGS = -Werror -Wall -Wno-format
+
 TARGET_OBJECTS = \
        $(TARGET_NAME).o
 
index 65269d5..fe5b070 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2002/07/04 19:56:36 dwelch Exp $
+# $Id: Makefile,v 1.2 2003/11/14 17:13:32 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = user32.a gdi32.a ntdll.a kernel32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index b144e59..ceadcf3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: database.c,v 1.10 2003/09/03 20:15:35 ekohl Exp $
+/* $Id: database.c,v 1.11 2003/11/14 17:13:33 weiden Exp $
  *
  * service control manager
  * 
@@ -422,7 +422,6 @@ ScmGetBootAndSystemDriverState(VOID)
 {
   PLIST_ENTRY ServiceEntry;
   PSERVICE CurrentService;
-  NTSTATUS Status;
 
   DPRINT("ScmGetBootAndSystemDriverState() called\n");
 
@@ -635,7 +634,6 @@ ScmAutoStartServices(VOID)
   PLIST_ENTRY ServiceEntry;
   PSERVICE_GROUP CurrentGroup;
   PSERVICE CurrentService;
-  NTSTATUS Status;
 
   /* Clear 'ServiceVisited' flag */
   ServiceEntry = ServiceListHead.Flink;
index 7efa7a6..a873eb4 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.5 2002/10/20 14:54:34 ekohl Exp $
+# $Id: makefile,v 1.6 2003/11/14 17:13:33 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o database.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 5ab4770..a1907a0 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.1 2003/05/02 18:08:39 ekohl Exp $
+# $Id: makefile,v 1.2 2003/11/14 17:13:33 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -12,7 +12,7 @@ TARGET_INSTALLDIR = system32
 
 TARGET_SDKLIBS = kernel32.a
 
-TARGET_CFLAGS = -DUNICODE
+TARGET_CFLAGS = -DUNICODE -Wall -Werror
 
 TARGET_LFLAGS =
 
index 1aa0edb..173523d 100755 (executable)
@@ -623,6 +623,7 @@ DestroyFileNodes()
 }
 
 
+#if 0
 static VOID
 DestroyDeletedFileNodes()
 /*
@@ -670,7 +671,7 @@ DestroyDeletedFileNodes()
       CurNode = NextNode;
     }
 }
-
+#endif
 
 static VOID
 DestroyFolderNodes()
@@ -693,7 +694,7 @@ DestroyFolderNodes()
   FolderListTail = NULL;
 }
 
-
+#if 0
 static VOID
 DestroyDeletedFolderNodes()
 /*
@@ -738,7 +739,7 @@ DestroyDeletedFolderNodes()
       CurNode = NextNode;
     }
 }
-
+#endif
 
 static PCFFOLDER_NODE
 LocateFolderNode(ULONG Index)
@@ -1063,7 +1064,7 @@ ReadDataBlocks(PCFFOLDER_NODE FolderNode)
   return CAB_STATUS_SUCCESS;
 }
 
-
+#if 0
 static ULONG
 ComputeChecksum(PVOID Buffer,
   UINT Size,
@@ -1122,7 +1123,7 @@ ComputeChecksum(PVOID Buffer,
   /* Return computed checksum */
   return Checksum;
 }
-
+#endif
 
 static ULONG
 CloseCabinet(VOID)
@@ -1132,10 +1133,6 @@ CloseCabinet(VOID)
  *     Status of operation
  */
 {
-  PCFFOLDER_NODE PrevNode;
-  PCFFOLDER_NODE NextNode;
-  ULONG Status;
-  
   DestroyFileNodes();
   
   DestroyFolderNodes();
@@ -1153,6 +1150,7 @@ CloseCabinet(VOID)
     }
 
   NtClose(FileHandle);
+  return 0;
 }
 
 
index 13deafa..6383b11 100644 (file)
@@ -129,7 +129,6 @@ WriteConsole(PCHAR Buffer,
 {
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status = STATUS_SUCCESS;
-  ULONG i;
 
   Status = NtWriteFile(StdOutput,
                       NULL,
@@ -218,7 +217,6 @@ ReadConsoleOutputCharacters(LPSTR lpCharacter,
                            PULONG lpNumberOfCharsRead)
 {
   IO_STATUS_BLOCK IoStatusBlock;
-  ULONG dwBytesReturned;
   OUTPUT_CHARACTER Buffer;
   NTSTATUS Status;
 
@@ -251,7 +249,6 @@ ReadConsoleOutputAttributes(PUSHORT lpAttribute,
                            PULONG lpNumberOfAttrsRead)
 {
   IO_STATUS_BLOCK IoStatusBlock;
-  ULONG dwBytesReturned;
   OUTPUT_ATTRIBUTE Buffer;
   NTSTATUS Status;
 
@@ -408,7 +405,6 @@ FillConsoleOutputAttribute(USHORT wAttribute,
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_ATTRIBUTE Buffer;
-  ULONG dwBytesReturned;
   NTSTATUS Status;
 
   Buffer.wAttribute = wAttribute;
@@ -443,7 +439,6 @@ FillConsoleOutputCharacter(CHAR Character,
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_CHARACTER Buffer;
-  ULONG dwBytesReturned;
   NTSTATUS Status;
 
   Buffer.cCharacter = Character;
@@ -654,7 +649,6 @@ SetConsoleTextAttribute(USHORT wAttributes)
 VOID
 ConInKey(PINPUT_RECORD Buffer)
 {
-  ULONG KeysRead;
 
   while (TRUE)
     {
index 99ff5d9..c68cd46 100644 (file)
@@ -60,6 +60,17 @@ WriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
                             COORD dwWriteCoord,
                             PULONG lpNumberOfAttrsWritten);
 
+NTSTATUS
+FillConsoleOutputAttribute(USHORT wAttribute,
+                          ULONG nLength,
+                          COORD dwWriteCoord,
+                          PULONG lpNumberOfAttrsWritten);
+NTSTATUS
+FillConsoleOutputCharacter(CHAR Character,
+                          ULONG Length,
+                          COORD WriteCoord,
+                          PULONG NumberOfCharsWritten);
+
 #if 0
 NTSTATUS
 SetConsoleMode(HANDLE hConsoleHandle,
index 7ff1566..2b63afb 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: infcache.c,v 1.8 2003/11/08 09:13:46 ekohl Exp $
+/* $Id: infcache.c,v 1.9 2003/11/14 17:13:33 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS text-mode setup
  * FILE:            subsys/system/usetup/infcache.c
@@ -506,7 +506,6 @@ static PVOID add_section_from_token( struct parser *parser )
 static struct field *add_field_from_token( struct parser *parser, int is_key )
 {
   PVOID field;
-  WCHAR *text;
 
   if (!parser->line)  /* need to start a new line */
     {
index f3740f8..0c732b5 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: inicache.c,v 1.6 2003/11/08 09:13:46 ekohl Exp $
+/* $Id: inicache.c,v 1.7 2003/11/14 17:13:33 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS text-mode setup
  * FILE:            subsys/system/usetup/inicache.c
@@ -218,7 +218,7 @@ IniCacheAddKey(PINICACHESECTION Section,
   return(Key);
 }
 
-
+#if 0
 static PINICACHESECTION
 IniCacheFindSection(PINICACHE Cache,
                    PWCHAR Name,
@@ -249,7 +249,7 @@ IniCacheFindSection(PINICACHE Cache,
 
   return(Section);
 }
-
+#endif
 
 static PINICACHESECTION
 IniCacheAddSection(PINICACHE Cache,
@@ -523,7 +523,6 @@ IniCacheLoad(PINICACHE *Cache,
   PCHAR Ptr;
   LARGE_INTEGER FileOffset;
 
-  ULONG i;
   PINICACHESECTION Section;
   PINICACHEKEY Key;
 
@@ -866,7 +865,6 @@ IniCacheInsertKey(PINICACHESECTION Section,
                  PWCHAR Data)
 {
   PINICACHEKEY Key;
-  ULONG i;
 
   Key = NULL;
 
@@ -1136,7 +1134,6 @@ IniCacheAppendSection(PINICACHE Cache,
                      PWCHAR Name)
 {
   PINICACHESECTION Section = NULL;
-  ULONG i;
 
   if (Cache == NULL || Name == NULL || *Name == 0)
     {
index f075223..302696b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.13 2003/08/24 10:36:06 chorns Exp $
+# $Id: makefile,v 1.14 2003/11/14 17:13:33 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -16,7 +16,7 @@ TARGET_SDKLIBS = zlib.a vfatlib.a ntdll.a
 
 TARGET_INSTALLDIR = system32
 
-TARGET_CFLAGS = -D__NTAPP__ -I$(PATH_TO_TOP)/lib/zlib
+TARGET_CFLAGS = -D__NTAPP__ -I$(PATH_TO_TOP)/lib/zlib -Wall -Werror -Wno-format
 
 TARGET_OBJECTS = $(TARGET_NAME).o bootsup.o cabinet.o console.o drivesup.o \
                  filequeue.o filesup.o format.o fslist.o infcache.o \
index e87cd63..04045e6 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: partlist.c,v 1.24 2003/10/06 19:22:42 chorns Exp $
+/* $Id: partlist.c,v 1.25 2003/11/14 17:13:34 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS text-mode setup
  * FILE:            subsys/system/usetup/partlist.c
@@ -36,7 +36,7 @@
 #include "console.h"
 #include "partlist.h"
 #include "drivesup.h"
-
+#include "bootsup.h"
 
 /* FUNCTIONS ****************************************************************/
 
@@ -567,7 +567,6 @@ CreatePartitionList (SHORT Left,
   PPARTLIST List;
   OBJECT_ATTRIBUTES ObjectAttributes;
   SYSTEM_DEVICE_INFORMATION Sdi;
-  DISK_GEOMETRY DiskGeometry;
   IO_STATUS_BLOCK Iosb;
   ULONG ReturnSize;
   NTSTATUS Status;
@@ -840,7 +839,7 @@ PrintPartitionData (PPARTLIST List,
       if (PartType == NULL)
        {
          sprintf (LineBuffer,
-                  "%c%c  Type %-3lu                         %6I64u %s",
+                  "%c%c  Type %-3u                         %6I64u %s",
                   (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter,
                   (PartEntry->DriveLetter == 0) ? '-' : ':',
                   PartEntry->PartInfo[0].PartitionType,
@@ -897,7 +896,6 @@ PrintDiskData (PPARTLIST List,
   USHORT Height;
   ULONGLONG DiskSize;
   PCHAR Unit;
-  SHORT PartIndex;
 
   Width = List->Right - List->Left - 1;
   Height = List->Bottom - List->Top - 1;
@@ -991,11 +989,9 @@ DrawPartitionList (PPARTLIST List)
 {
   PLIST_ENTRY Entry;
   PDISKENTRY DiskEntry;
-  CHAR LineBuffer[128];
   COORD coPos;
   ULONG Written;
   SHORT i;
-  SHORT DiskIndex;
 
   /* draw upper left corner */
   coPos.X = List->Left;
@@ -1191,7 +1187,6 @@ ScrollUpPartitionList (PPARTLIST List)
   PPARTENTRY PartEntry;
   PLIST_ENTRY Entry1;
   PLIST_ENTRY Entry2;
-  ULONG i;
 
   /* Check for empty disks */
   if (IsListEmpty (&List->DiskListHead))
index eb9f2fa..13ca4bf 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "usetup.h"
 #include "progress.h"
+#include "console.h"
 
 /* FUNCTIONS ****************************************************************/
 
@@ -90,7 +91,6 @@ DrawProgressBar(PPROGRESS Bar)
   CHAR TextBuffer[8];
   COORD coPos;
   ULONG Written;
-  SHORT i;
 
   /* Print percentage */
   sprintf(TextBuffer, "%-3lu%%", Bar->Percent);
index 4579fea..a3311f1 100644 (file)
@@ -190,7 +190,6 @@ do_reg_operation(HANDLE KeyHandle,
   WCHAR EmptyStr = (WCHAR)0;
   ULONG Type;
   ULONG Size;
-  NTSTATUS Status;
 
   if (Flags & FLG_ADDREG_DELVAL)  /* deletion */
     {
@@ -435,7 +434,7 @@ CreateNestedKey (PHANDLE KeyHandle,
     {
       if (Length == FullNameLength)
        {
-         Status == STATUS_SUCCESS;
+         Status = STATUS_SUCCESS;
          *KeyHandle = LocalKeyHandle;
          break;
        }
index 6c989c2..82d92c3 100644 (file)
@@ -43,6 +43,8 @@
 #include "format.h"
 #include "fslist.h"
 #include "cabinet.h"
+#include "filesup.h"
+#include "drivesup.h"
 
 #define NDEBUG
 #include <debug.h>
@@ -1125,7 +1127,7 @@ ShowPartitionSizeInputBox(SHORT Left,
                                 strlen (Buffer),
                                 coPos);
 
-  sprintf (Buffer, "MB (max. %d MB)", MaxSize);
+  sprintf (Buffer, "MB (max. %lu MB)", MaxSize);
   coPos.X = iLeft + PARTITION_SIZE_INPUT_FIELD_LENGTH + 1;
   coPos.Y = iTop;
   WriteConsoleOutputCharacters (Buffer,
@@ -1718,7 +1720,6 @@ FormatPartitionPage (PINPUT_RECORD Ir)
   WCHAR PathBuffer[MAX_PATH];
   PDISKENTRY DiskEntry;
   PPARTENTRY PartEntry;
-  PLIST_ENTRY Entry;
   NTSTATUS Status;
 
 #ifndef NDEBUG
@@ -2080,12 +2081,10 @@ InstallDirectoryPage(PINPUT_RECORD Ir)
 {
   PDISKENTRY DiskEntry;
   PPARTENTRY PartEntry;
-  WCHAR PathBuffer[MAX_PATH];
   WCHAR InstallDir[51];
   PWCHAR DefaultPath;
   INFCONTEXT Context;
   ULONG Length;
-  NTSTATUS Status;
 
   if (PartitionList == NULL ||
       PartitionList->CurrentDisk == NULL ||
@@ -2189,13 +2188,11 @@ PrepareCopyPageInfFile(HINF InfFile, PWCHAR SourceCabinet, PINPUT_RECORD Ir)
   WCHAR PathBuffer[MAX_PATH];
   INFCONTEXT FilesContext;
   INFCONTEXT DirContext;
-  PWCHAR KeyName;
   PWCHAR KeyValue;
   ULONG Length;
   NTSTATUS Status;
   PWCHAR FileKeyName;
   PWCHAR FileKeyValue;
-  PWCHAR DirKeyName;
   PWCHAR DirKeyValue;
   PWCHAR TargetFileName;
 
@@ -2384,7 +2381,6 @@ PrepareCopyPageInfFile(HINF InfFile, PWCHAR SourceCabinet, PINPUT_RECORD Ir)
 static PAGE_NUMBER
 PrepareCopyPage(PINPUT_RECORD Ir)
 {
-  INT CabStatus;
   HINF InfHandle;
   WCHAR PathBuffer[MAX_PATH];
   INFCONTEXT CabinetsContext;
@@ -2732,8 +2728,6 @@ BootLoaderPage(PINPUT_RECORD Ir)
 {
   WCHAR SrcPath[MAX_PATH];
   WCHAR DstPath[MAX_PATH];
-  PINICACHE IniCache;
-  PINICACHESECTION IniSection;
   NTSTATUS Status;
 
   SetTextXY(6, 8, "Installing the boot loader");
@@ -3525,6 +3519,9 @@ NtProcessStartup(PPEB Peb)
            Page = RepairIntroPage(&Ir);
            break;
 
+         case REBOOT_PAGE:
+               break;
+
 
          /* Emergency pages */
          case EMERGENCY_INTRO_PAGE:
index dad9a62..f4a38dd 100755 (executable)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2003/09/07 11:17:51 ekohl Exp $
+# $Id: Makefile,v 1.3 2003/11/14 17:13:35 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = kernel32.a gdi32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index 18a5051..7247ed2 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.6 2003/03/25 19:26:32 ekohl Exp $
+# $Id: makefile,v 1.7 2003/11/14 17:13:35 weiden Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -14,6 +14,8 @@ TARGET_SDKLIBS = ntdll.a kernel32.a user32.a
 
 TARGET_OBJECTS = $(TARGET_NAME).o setup.o
 
+TARGET_CFLAGS = -Wall -Werror
+
 include $(PATH_TO_TOP)/rules.mak
 
 include $(TOOLS_PATH)/helper.mk
index af65f37..403b84c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: winlogon.c,v 1.19 2003/08/28 13:38:24 gvg Exp $
+/* $Id: winlogon.c,v 1.20 2003/11/14 17:13:35 weiden Exp $
  * 
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -116,6 +116,7 @@ static BOOLEAN StartServices(VOID)
    return TRUE;
 }
 
+#if 0
 static BOOLEAN StartLsass(VOID)
 {
    HANDLE LsassInitEvent;
@@ -170,7 +171,7 @@ static BOOLEAN StartLsass(VOID)
    
    return(TRUE);
 }
-
+#endif
 static BOOLEAN OpenRegistryKey(HANDLE *WinLogonKey)
 {
    return ERROR_SUCCESS == RegOpenKeyEx(HKEY_LOCAL_MACHINE,
@@ -303,14 +304,12 @@ WinMain(HINSTANCE hInstance,
   NTSTATUS Status;
   HANDLE LsaHandle;
   LSA_OPERATIONAL_MODE Mode;
-#endif
   CHAR LoginPrompt[] = "login:";
   CHAR PasswordPrompt[] = "password:";
-  DWORD Result;
+#endif
   CHAR LoginName[255];
   CHAR Password[255];
   BOOL Success;
-  ULONG i;
   NTSTATUS Status;
   
   /*
index c212e70..f8ab6e0 100644 (file)
@@ -1,5 +1,7 @@
 PATH_TO_TOP = ..
 
+CFLAGS += -Wall -Werror
+
 TOOLS = \
   buildno$(EXE_POSTFIX) \
   depends$(EXE_POSTFIX) \
index 86d9be5..2defd35 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: buildno.c,v 1.2 2003/10/15 02:56:02 vizzini Exp $
+/* $Id: buildno.c,v 1.3 2003/11/14 17:13:35 weiden Exp $
  *
  * buildno - Generate the build number for ReactOS
  *
@@ -36,6 +36,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>
+#include <string.h>
 #include "../include/reactos/version.h"
 
 #define FALSE 0
index 18c5926..ca96dc7 100755 (executable)
 #include "raw.h"
 #include "mszip.h"
 
+#if defined(WIN32)
+#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
+static long _GetSizeOfFile(FILEHANDLE handle)
+{
+    unsigned long size = GetFileSize(handle, NULL);
+    if (size == INVALID_FILE_SIZE)
+      {
+        return -1;
+      }
+    return size;
+}
+#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
+static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
+{
+    return ReadFile(handle, buffer, size, bytesread, NULL);
+}
+#else
+#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
+static long _GetSizeOfFile(FILEHANDLE handle)
+{
+    long size;
+    fseek(handle, 0, SEEK_END);
+    size = ftell(handle);
+    fseek(handle, 0, SEEK_SET);
+    return size;
+}
+#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
+static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
+{
+    *bytesread = fread(buffer, 1, size, handle);
+    return *bytesread == size;
+}
+#endif
 
 #ifndef CAB_READ_ONLY
 
@@ -762,7 +795,7 @@ unsigned long CCabinet::FindNext(PCAB_SEARCH Search)
         while ((Search->Next) &&
             (Search->Next->File.FileControlID > CAB_FILE_MAX_FOLDER) &&
             (Search->Next->File.FileOffset <= LastFileOffset)) {
-            DPRINT(MAX_TRACE, ("Skipping file (%s)  FileOffset (0x%X)  LastFileOffset (0x%X).\n",
+            DPRINT(MAX_TRACE, ("Skipping file (%s)  FileOffset (0x%lX)  LastFileOffset (0x%lX).\n",
                 Search->Next->FileName, Search->Next->File.FileOffset, LastFileOffset));
             Search->Next = Search->Next->Next;
         }
@@ -910,7 +943,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
 #if defined(WIN32)
     if (!DosDateTimeToFileTime(File->File.FileDate, File->File.FileTime, &FileTime)) {
         CloseFile(DestFile);
-        DPRINT(MIN_TRACE, ("DosDateTimeToFileTime() failed (%d).\n", GetLastError()));
+        DPRINT(MIN_TRACE, ("DosDateTimeToFileTime() failed (%lu).\n", GetLastError()));
         return CAB_STATUS_CANNOT_WRITE;
     }
 
@@ -957,7 +990,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
        ReuseBlock = (CurrentDataNode == File->DataBlock);
     if (Size > 0) {
                do {
-                       DPRINT(MAX_TRACE, ("CO (0x%X)    ReuseBlock (%d)    Offset (0x%X)   Size (%d)  BytesLeftInBlock (%d)\n",
+                       DPRINT(MAX_TRACE, ("CO (0x%lX)    ReuseBlock (%d)    Offset (0x%lX)   Size (%ld)  BytesLeftInBlock (%ld)\n",
                                File->DataBlock->UncompOffset, (unsigned int)ReuseBlock, Offset, Size,
                                BytesLeftInBlock));
 
@@ -968,7 +1001,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
                 CurrentBuffer  = Buffer;
                 TotalBytesRead = 0;
                 do {
-                    DPRINT(MAX_TRACE, ("Size (%d bytes).\n", Size));
+                    DPRINT(MAX_TRACE, ("Size (%lu bytes).\n", Size));
 
                     if (((Status = ReadBlock(&CFData, sizeof(CFDATA), &BytesRead)) != 
                         CAB_STATUS_SUCCESS) || (BytesRead != sizeof(CFDATA))) {
@@ -987,8 +1020,8 @@ unsigned long CCabinet::ExtractFile(char* FileName)
 
                     BytesToRead = CFData.CompSize;
 
-                                       DPRINT(MAX_TRACE, ("Read: (0x%X,0x%X).\n",
-                                               CurrentBuffer, Buffer));
+                                       DPRINT(MAX_TRACE, ("Read: (0x%lX,0x%lX).\n",
+                                               (DWORD)CurrentBuffer, (DWORD)Buffer));
 
                     if (((Status = ReadBlock(CurrentBuffer, BytesToRead, &BytesRead)) != 
                         CAB_STATUS_SUCCESS) || (BytesToRead != BytesRead)) {
@@ -1075,7 +1108,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
                     }
                 } while (CFData.UncompSize == 0);
 
-                DPRINT(MAX_TRACE, ("TotalBytesRead (%d).\n", TotalBytesRead));
+                DPRINT(MAX_TRACE, ("TotalBytesRead (%lu).\n", TotalBytesRead));
 
                 Status = Codec->Uncompress(OutputBuffer, Buffer, TotalBytesRead, &BytesToWrite);
                 if (Status != CS_SUCCESS) {
@@ -1088,7 +1121,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
                 }
 
                 if (BytesToWrite != CFData.UncompSize) {
-                    DPRINT(MID_TRACE, ("BytesToWrite (%d) != CFData.UncompSize (%d)\n",
+                    DPRINT(MID_TRACE, ("BytesToWrite (%lu) != CFData.UncompSize (%d)\n",
                         BytesToWrite, CFData.UncompSize));
                     return CAB_STATUS_INVALID_CAB;
                 }
@@ -1099,7 +1132,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
 
                 BytesToWrite = BytesLeftInBlock;
 
-                               DPRINT(MAX_TRACE, ("Seeking to absolute offset 0x%X.\n",
+                               DPRINT(MAX_TRACE, ("Seeking to absolute offset 0x%lX.\n",
                                        CurrentDataNode->AbsoluteOffset + sizeof(CFDATA) +
                     CurrentDataNode->Data.CompSize));
 
@@ -1157,7 +1190,7 @@ unsigned long CCabinet::ExtractFile(char* FileName)
             if (!WriteFile(DestFile, (void*)((unsigned long)OutputBuffer + BytesSkipped),
                 BytesToWrite, &BytesWritten, NULL) ||
                 (BytesToWrite != BytesWritten)) {
-                                       DPRINT(MIN_TRACE, ("Status 0x%X.\n", GetLastError()));
+                                       DPRINT(MIN_TRACE, ("Status 0x%lX.\n", GetLastError()));
 #else
             BytesWritten = BytesToWrite;
             if (fwrite((void*)((unsigned long)OutputBuffer + BytesSkipped),
@@ -1430,7 +1463,7 @@ unsigned long CCabinet::WriteFileToScratchStorage(PCFFILE_NODE FileNode)
                 BytesToRead = TotalBytesLeft;
 
             if (!ReadFileData(SourceFile, CurrentIBuffer, BytesToRead, &BytesRead) || (BytesToRead != BytesRead)) {
-                DPRINT(MIN_TRACE, ("Cannot read from file. BytesToRead (%d)  BytesRead (%d)  CurrentIBufferSize (%d).\n",
+                DPRINT(MIN_TRACE, ("Cannot read from file. BytesToRead (%lu)  BytesRead (%lu)  CurrentIBufferSize (%lu).\n",
                     BytesToRead, BytesRead, CurrentIBufferSize));
                 return CAB_STATUS_INVALID_CAB;
             }
@@ -1506,7 +1539,7 @@ unsigned long CCabinet::WriteDisk(unsigned long MoreDisks)
                 ContinueFile = true;
                 CreateNewDisk = false;
 
-                DPRINT(MAX_TRACE, ("First on new disk. CurrentIBufferSize (%d)  CurrentOBufferSize (%d).\n", 
+                DPRINT(MAX_TRACE, ("First on new disk. CurrentIBufferSize (%lu)  CurrentOBufferSize (%lu).\n", 
                     CurrentIBufferSize, CurrentOBufferSize));
 
                 if ((CurrentIBufferSize > 0) || (CurrentOBufferSize > 0)) {
@@ -1673,8 +1706,6 @@ unsigned long CCabinet::CloseCabinet()
  *     Status of operation
  */
 {
-    PCFFOLDER_NODE PrevNode;
-    PCFFOLDER_NODE NextNode;
     unsigned long Status;
 
     DestroyFileNodes();
@@ -2052,7 +2083,7 @@ unsigned long CCabinet::ReadFileTable()
     unsigned long BytesRead;
     PCFFILE_NODE File;
 
-    DPRINT(MAX_TRACE, ("Reading file table at absolute offset (0x%X).\n",
+    DPRINT(MAX_TRACE, ("Reading file table at absolute offset (0x%lX).\n",
         CABHeader.FileTableOffset));
 
     /* Seek to file table */
@@ -2125,7 +2156,7 @@ unsigned long CCabinet::ReadDataBlocks(PCFFOLDER_NODE FolderNode)
     unsigned long Status;
     unsigned long i;
 
-    DPRINT(MAX_TRACE, ("Reading data blocks for folder (%d)  at absolute offset (0x%X).\n",
+    DPRINT(MAX_TRACE, ("Reading data blocks for folder (%lu)  at absolute offset (0x%lX).\n",
         FolderNode->Index, FolderNode->Folder.DataOffset));
 
     AbsoluteOffset = FolderNode->Folder.DataOffset;
@@ -2502,8 +2533,6 @@ unsigned long CCabinet::InitCabinetHeader()
  *     Status of operation
  */
 {
-    PCFFOLDER_NODE FolderNode;
-    PCFFILE_NODE FileNode;
     unsigned long TotalSize;
     unsigned long Size;
 
@@ -2764,7 +2793,7 @@ unsigned long CCabinet::WriteFolderEntries()
     while (FolderNode != NULL) {
         if (FolderNode->Commit) {
 
-            DPRINT(MAX_TRACE, ("Writing folder entry. CompressionType (0x%X)  DataBlockCount (%d)  DataOffset (0x%X).\n",
+            DPRINT(MAX_TRACE, ("Writing folder entry. CompressionType (0x%X)  DataBlockCount (%d)  DataOffset (0x%lX).\n",
                 FolderNode->Folder.CompressionType, FolderNode->Folder.DataBlockCount, FolderNode->Folder.DataOffset));
 
 #if defined(WIN32)
@@ -2821,7 +2850,7 @@ unsigned long CCabinet::WriteFileEntries()
                 SetCont = true;
             }
 
-            DPRINT(MAX_TRACE, ("Writing file entry. FileControlID (0x%X)  FileOffset (0x%X)  FileSize (%d)  FileName (%s).\n",
+            DPRINT(MAX_TRACE, ("Writing file entry. FileControlID (0x%X)  FileOffset (0x%lX)  FileSize (%lu)  FileName (%s).\n",
                 File->File.FileControlID, File->File.FileOffset, File->File.FileSize, File->FileName));
 
 #if defined(WIN32)
@@ -2883,7 +2912,7 @@ unsigned long CCabinet::CommitDataBlocks(PCFFOLDER_NODE FolderNode)
         Status = ScratchFile->Seek(DataNode->ScratchFilePosition);
     
     while (DataNode != NULL) {
-        DPRINT(MAX_TRACE, ("Reading block at (0x%X)  CompSize (%d)  UncompSize (%d).\n",
+        DPRINT(MAX_TRACE, ("Reading block at (0x%lX)  CompSize (%d)  UncompSize (%d).\n",
             DataNode->ScratchFilePosition,
             DataNode->Data.CompSize,
             DataNode->Data.UncompSize));
@@ -2948,7 +2977,7 @@ unsigned long CCabinet::WriteDataBlock()
             CurrentIBufferSize,
             &TotalCompSize);
 
-        DPRINT(MAX_TRACE, ("Block compressed. CurrentIBufferSize (%d)  TotalCompSize(%d).\n",
+        DPRINT(MAX_TRACE, ("Block compressed. CurrentIBufferSize (%lu)  TotalCompSize(%lu).\n",
             CurrentIBufferSize, TotalCompSize));
 
         CurrentOBuffer     = OutputBuffer;
@@ -3101,7 +3130,7 @@ unsigned long CCabinet::GetAttributesOnFile(PCFFILE_NODE File)
  */
 {
 #if defined(WIN32)
-    unsigned long Attributes;
+    long Attributes;
 
     Attributes = GetFileAttributes(File->FileName);
     if (Attributes == -1)
index 5987406..b200a80 100755 (executable)
 #define FreeMemory(buffer) HeapFree(GetProcessHeap(), 0, buffer)
 #define FILEHANDLE HANDLE
 #define CloseFile(handle) CloseHandle(handle)
-#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
-static long _GetSizeOfFile(FILEHANDLE handle)
-{
-    long size = GetFileSize(handle, NULL);
-    if (size == INVALID_FILE_SIZE)
-      {
-        return -1;
-      }
-    return size;
-}
-#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
-static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
-{
-    return ReadFile(handle, buffer, size, bytesread, NULL);
-}
 #else
 #define DIR_SEPARATOR_CHAR '/'
 #define DIR_SEPARATOR_STRING "/"
@@ -55,21 +40,6 @@ static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, u
 #define FreeMemory(buffer) free(buffer)
 #define CloseFile(handle) fclose(handle)
 #define FILEHANDLE FILE*
-#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
-static long _GetSizeOfFile(FILEHANDLE handle)
-{
-    long size;
-    fseek(handle, 0, SEEK_END);
-    size = ftell(handle);
-    fseek(handle, 0, SEEK_SET);
-    return size;
-}
-#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
-static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
-{
-    *bytesread = fread(buffer, 1, size, handle);
-    return *bytesread == size;
-}
 #endif
 
 /* Debugging */
index d9de8ec..7887a2b 100755 (executable)
 #include "dfp.h"
 
 
+#if defined(WIN32)
+#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
+static long _GetSizeOfFile(FILEHANDLE handle)
+{
+    unsigned long size = GetFileSize(handle, NULL);
+    if (size == INVALID_FILE_SIZE)
+      {
+        return -1;
+      }
+    return size;
+}
+#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
+static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
+{
+    return ReadFile(handle, buffer, size, bytesread, NULL);
+}
+#else
+#define GetSizeOfFile(handle) _GetSizeOfFile(handle)
+static long _GetSizeOfFile(FILEHANDLE handle)
+{
+    long size;
+    fseek(handle, 0, SEEK_END);
+    size = ftell(handle);
+    fseek(handle, 0, SEEK_SET);
+    return size;
+}
+#define ReadFileData(handle, buffer, size, bytesread) _ReadFileData(handle, buffer, size, bytesread)
+static bool _ReadFileData(FILEHANDLE handle, void* buffer, unsigned long size, unsigned long* bytesread)
+{
+    *bytesread = fread(buffer, 1, size, handle);
+    return *bytesread == size;
+}
+#endif
+
 /* CDFParser */
 
 CDFParser::CDFParser()
@@ -190,7 +224,7 @@ unsigned long CDFParser::Load(char* FileName)
 #endif
 
     FileSize = GetSizeOfFile(FileHandle);
-    if (FileSize == (unsigned long)-1) {
+    if (FileSize == -1) {
         CloseFile(FileHandle);
         return CAB_STATUS_CANNOT_OPEN;
     }
@@ -214,7 +248,7 @@ unsigned long CDFParser::Load(char* FileName)
 
     FileLoaded = true;
 
-    DPRINT(MAX_TRACE, ("File (%d bytes)\n", FileBufferSize));
+    DPRINT(MAX_TRACE, ("File (%lu bytes)\n", FileBufferSize));
 
     return CAB_STATUS_SUCCESS;
 }
@@ -278,7 +312,7 @@ unsigned long CDFParser::Parse()
             while (CurrentToken != TokenEnd) {
                 switch (CurrentToken) {
                 case TokenInteger:
-                    sprintf(CurrentString, "%d", CurrentInteger);
+                    sprintf(CurrentString, "%lu", CurrentInteger);
                 case TokenIdentifier:
                     if (Command) {
                         /* Command */
@@ -361,7 +395,8 @@ bool CDFParser::OnDiskLabel(unsigned long Number, char* Label)
  */
 {
     char Buffer[20];
-    int i, j;
+    unsigned int i;
+       int j;
     char ch;
 
     Number += 1;
@@ -377,7 +412,7 @@ bool CDFParser::OnDiskLabel(unsigned long Number, char* Label)
         for (i = 0; i < strlen(DiskLabelTemplate); i++) {
             ch = DiskLabelTemplate[i];
             if (ch == '*') {
-                sprintf(Buffer, "%d", Number);
+                sprintf(Buffer, "%lu", Number);
                 strcat(Label, Buffer);
                 j += strlen(Buffer);
             } else {
@@ -406,7 +441,8 @@ bool CDFParser::OnCabinetName(unsigned long Number, char* Name)
  */
 {
     char Buffer[MAX_PATH];
-    int i, j;
+    unsigned int i;
+       int j;
     char ch;
 
     Number += 1;
@@ -425,7 +461,7 @@ bool CDFParser::OnCabinetName(unsigned long Number, char* Name)
         for (i = 0; i < strlen(CabinetNameTemplate); i++) {
             ch = CabinetNameTemplate[i];
             if (ch == '*') {
-                sprintf(Buffer, "%d", Number);
+                sprintf(Buffer, "%lu", Number);
                 strcat(Name, Buffer);
                 j += strlen(Buffer);
             } else {
@@ -1033,7 +1069,7 @@ unsigned long CDFParser::PerformFileCopy()
         else if (Status == CAB_STATUS_NOMEMORY)
             printf("Insufficient memory to add file: %s.\n", SrcName);
         else
-            printf("Cannot add file: %s (%d).\n", SrcName, Status);
+            printf("Cannot add file: %s (%lu).\n", SrcName, Status);
         return Status;
     }
 
index 7ada7ad..faede81 100755 (executable)
@@ -374,7 +374,7 @@ bool CCABManager::DisplayCabinet()
                     printf("%s ", Date2Str((char*)&Str, Search.File->FileDate));
                     printf("%s ", Time2Str((char*)&Str, Search.File->FileTime));
                     printf("%s ", Attr2Str((char*)&Str, Search.File->Attributes));
-                    sprintf(Str, "%d", Search.File->FileSize);
+                    sprintf(Str, "%lu", Search.File->FileSize);
                     printf("%s ", Pad(Str, ' ', 13));
                     printf("%s\n", Search.FileName);
 
@@ -388,14 +388,14 @@ bool CCABManager::DisplayCabinet()
             if (FileCount == 1)
                 printf("                 1 file    ");
             else {
-                sprintf(Str, "%d", FileCount);
+                sprintf(Str, "%lu", FileCount);
                 printf("      %s files   ", Pad(Str, ' ', 12));
             }
 
             if (ByteCount == 1)
                 printf("           1 byte\n");
             else {
-                sprintf(Str, "%d", ByteCount);
+                sprintf(Str, "%lu", ByteCount);
                 printf("%s bytes\n", Pad(Str, ' ', 12));
             }
         } else {
@@ -481,8 +481,6 @@ bool CCABManager::OnOverwrite(PCFFILE File,
  *     true if the file should be overwritten, false if not
  */
 {
-    char ch;
-
     if (Mode == CM_MODE_CREATE)
         return true;
 
index 3e46d93..9483433 100755 (executable)
@@ -11,7 +11,7 @@ OBJECTS = cabinet.o mszip.o raw.o  main.o dfp.o
 
 CLEAN_FILES = *.o cabman$(EXE_POSTFIX)
 
-HOST_CFLAGS = -g -I. -I $(PATH_TO_TOP)/lib/zlib
+HOST_CFLAGS = -g -I. -I $(PATH_TO_TOP)/lib/zlib -Werror -Wall
 
 HOST_LFLAGS = -g $(PATH_TO_TOP)/lib/zlib/zlib.host.a
 
index b347d6d..d120189 100755 (executable)
@@ -1,4 +1,4 @@
-# $Id: makefile.win32,v 1.1 2003/08/24 10:36:07 chorns Exp $
+# $Id: makefile.win32,v 1.2 2003/11/14 17:13:35 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -15,7 +15,7 @@ TARGET_OBJECTS = cabinet.o mszip.o raw.o main.o dfp.o
 
 TARGET_SDKLIBS = zlib.a
 
-TARGET_CFLAGS = -I$(PATH_TO_TOP)/lib/zlib
+TARGET_CFLAGS = -I$(PATH_TO_TOP)/lib/zlib -Werror -Wall
 
 TARGET_CPPFLAGS = $(TARGET_CFLAGS)
 
index 34dc6cf..6b3bc0d 100644 (file)
@@ -11,7 +11,7 @@ OBJECTS = cdmake.o llmosrt.o
 
 CLEAN_FILES = *.o cdmake$(EXE_POSTFIX)
 
-HOST_CFLAGS = -I.
+HOST_CFLAGS = -I. -Werror -Wall
 
 cdmake.o: cdmake.c
        $(HOST_CC) $(HOST_CFLAGS) -c cdmake.c -o cdmake.o
index 7056ce8..bdcfad3 100644 (file)
@@ -14,7 +14,7 @@ CLEAN_FILES = *.o create_nls$(EXE_POSTFIX)
 create_nls$(EXE_POSTFIX): $(OBJECTS)
        $(HOST_CC) $(OBJECTS) -o create_nls$(EXE_POSTFIX)
 
-HOST_CFLAGS = -I.
+HOST_CFLAGS = -I. -Wall -Werror
 
 create_nls.o: create_nls.c
        $(HOST_CC) $(HOST_CFLAGS) -c create_nls.c -o create_nls.o
index cb50408..2b3bfe5 100644 (file)
@@ -11,7 +11,7 @@ OBJECTS = mkhive.o binhive.o infcache.o reginf.o registry.o
 
 CLEAN_FILES = *.o mkhive$(EXE_POSTFIX)
 
-HOST_CFLAGS = -I.
+HOST_CFLAGS = -I. -Werror -Wall
 
 mkhive.o: mkhive.c
        $(HOST_CC) $(HOST_CFLAGS) -c mkhive.c -o mkhive.o
index 2edad15..f9e1d3d 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: binhive.c,v 1.7 2003/10/11 16:54:51 ekohl Exp $
+/* $Id: binhive.c,v 1.8 2003/11/14 17:13:36 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS hive maker
  * FILE:            tools/mkhive/binhive.c
@@ -29,6 +29,7 @@
 //#include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include "mkhive.h"
 #include "binhive.h"
@@ -738,7 +739,6 @@ CmiAllocateCell (PREGISTRY_HIVE RegistryHive,
                 PBLOCK_OFFSET pBlockOffset)
 {
   PCELL_HEADER NewBlock;
-  PHBIN pBin;
   ULONG i;
 
   *Block = NULL;
@@ -1228,7 +1228,6 @@ CmiExportHive (PREGISTRY_HIVE Hive,
 {
   PKEY_CELL KeyCell;
   HKEY Key;
-  ULONG i;
   ULONG SubKeyCount;
   ULONG ValueCount;
   PLIST_ENTRY Entry;
index d5ce2c9..0273610 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: infcache.c,v 1.7 2003/10/16 08:39:28 robd Exp $
+/* $Id: infcache.c,v 1.8 2003/11/14 17:13:36 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS hive maker
  * FILE:            tools/mkhive/infcache.c
@@ -30,6 +30,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
+#include <ctype.h>
 
 #include "mkhive.h"
 #include "infcache.h"
@@ -490,7 +491,6 @@ static PVOID add_section_from_token( struct parser *parser )
 static struct field *add_field_from_token( struct parser *parser, int is_key )
 {
   PVOID field;
-  CHAR *text;
 
   if (!parser->line)  /* need to start a new line */
     {
index e8a5295..fa8f536 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: mkhive.c,v 1.2 2003/04/16 15:06:33 ekohl Exp $
+/* $Id: mkhive.c,v 1.3 2003/11/14 17:13:36 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS hive maker
  * FILE:            tools/mkhive/mkhive.c
@@ -26,6 +26,7 @@
 
 #include <limits.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "mkhive.h"
 #include "registry.h"
index 0af7e46..9bc7176 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: reginf.c,v 1.5 2003/07/27 22:27:36 ekohl Exp $
+/* $Id: reginf.c,v 1.6 2003/11/14 17:13:36 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS hive maker
  * FILE:            tools/mkhive/reginf.h
@@ -28,6 +28,7 @@
 
 #include <string.h>
 #include <stdlib.h>
+#include <stdio.h>
 
 #include "mkhive.h"
 #include "registry.h"
index 41c4023..6afd905 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: registry.c,v 1.7 2003/10/19 09:35:07 ekohl Exp $
+/* $Id: registry.c,v 1.8 2003/11/14 17:13:36 weiden Exp $
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS hive maker
  * FILE:            tools/mkhive/registry.c
@@ -32,6 +32,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <stdio.h>
 
 #include "mkhive.h"
 #include "registry.h"
index ee35732..3270a26 100644 (file)
@@ -177,7 +177,6 @@ copy_directory (char *path1, char *path2)
   struct stat stbuf;
   char buf[MAX_PATH];
   char tobuf[MAX_PATH];
-  char err[400];
 
   dirp = opendir(path1); 
 
@@ -240,7 +239,6 @@ is_directory(char *path)
 {
   struct stat stbuf;
   char buf[MAX_PATH];
-  char err[400];
 
   // Convert to absolute path
   make_absolute(buf, path);
index 2477e10..d7aa38c 100755 (executable)
@@ -293,8 +293,6 @@ static char HELP[] =
 int main(int argc, char **argv)
 {
   char buf[MAX_PATH];
-  int i;
-
   if (argc < 2)
   {
     puts(HELP);
index 4d5291c..2befe0d 100755 (executable)
@@ -8,7 +8,7 @@ OBJECTS = rgenstat.o llmosrt.o
 
 CLEAN_FILES = *.o rgenstat$(EXE_POSTFIX)
 
-HOST_CFLAGS = -I.
+HOST_CFLAGS = -I. -Wall -Werror
 
 rgenstat.o: rgenstat.c
        $(HOST_CC) $(HOST_CFLAGS) -c rgenstat.c -o rgenstat.o
index 126602d..802a3ed 100755 (executable)
@@ -50,7 +50,6 @@ PAPI_INFO sort_linked_list(PAPI_INFO,
 
 static FILE *in;
 static FILE *out;
-static char *file;
 static FILE *file_handle = NULL;
 static char *file_buffer = NULL;
 static unsigned int file_size = 0;
@@ -665,7 +664,6 @@ generate_xml_for_component(char *component_name)
   PAPI_INFO api_info;
   char buf[200];
   int complete;
-  int total;
   int implemented_total;
   int unimplemented_total;
 
@@ -882,7 +880,6 @@ int main(int argc, char **argv)
 {
   char *input_file;
   char *output_file;
-  int i;
 
   if (argc < 2)
   {
index fe3a15c..c6bdda1 100755 (executable)
@@ -54,7 +54,6 @@ int main(int argc, char* argv[])
   FILE* in;
   FILE* out;
   char* in_buf;
-  char* out_buf;
   int in_size;
   int in_ptr;
   int linelen;
index c3b903a..fe9be2f 100644 (file)
@@ -1,6 +1,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <ctype.h>
+#include <direct.h>
 
 #ifdef UNIX_PATHS
 #define DIR_SEPARATOR_CHAR '/'
@@ -73,10 +75,7 @@ int mkdir_p(char* path)
 int main(int argc, char* argv[])
 {
    char* path1;
-   FILE* in;
-   FILE* out;
    char* csec;
-   int is_abs_path;
    char buf[256];
    
    if (argc != 2)
index 50a31b3..5971dcf 100644 (file)
@@ -159,7 +159,6 @@ int main(int argc, char* argv[])
   char* path2;
   FILE* in;
   FILE* out;
-  char* buf;
   int n_in;
   int n_out;
    
index 1d9c7c6..8c13e73 100755 (executable)
@@ -3,10 +3,12 @@
 
 #ifdef WIN32
 #include <sys/utime.h>
+#include <time.h>
 #else
 #include <sys/time.h>
-#include <stdlib.h>
 #endif
+#include <stdlib.h>
+#include <string.h>
 
 #include <fcntl.h>
 #include <stdio.h>
index df79d7e..b82688b 100644 (file)
@@ -696,6 +696,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
              else
                {
                  if (opterr)
+                  {
                   if (argv[optind - 1][1] == '-')
                    /* --option */
                    fprintf (stderr,
@@ -706,7 +707,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
                    fprintf (stderr,
                     _("%s: option `%c%s' doesn't allow an argument\n"),
                     argv[0], argv[optind - 1][0], pfound->name);
-
+                  }
                  nextchar += strlen (nextchar);
 
                  optopt = pfound->val;
index 5de3fa8..ee412de 100644 (file)
@@ -14,7 +14,7 @@ CLEAN_FILES = *.o wmc$(EXE_POSTFIX)
 wmc$(EXE_POSTFIX): $(OBJECTS)
        $(HOST_CC) $(OBJECTS) -g -o wmc$(EXE_POSTFIX)
 
-HOST_CFLAGS = -I.
+HOST_CFLAGS = -I. -Werror -Wall
 
 getopt.o: getopt.c
        $(HOST_CC) $(HOST_CFLAGS) -g -c getopt.c -o getopt.o