From 1c3867a641090043cd93592700f0660e998b658f Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Fri, 14 Nov 2003 17:13:36 +0000 Subject: [PATCH] Patch by Jonathon Wilson: fix most of ReactOS to build with -Wall -Werror by default svn path=/trunk/; revision=6645 --- reactos/apps/tests/SampleWindow/makefile | 4 +- reactos/apps/tests/alive/Makefile | 4 +- reactos/apps/tests/apc/makefile | 4 +- reactos/apps/tests/apc2/apc2.c | 5 +- reactos/apps/tests/apc2/makefile | 2 + reactos/apps/tests/args/makefile | 4 +- reactos/apps/tests/atomtest/makefile | 5 +- reactos/apps/tests/bench/bench-thread.c | 1 - reactos/apps/tests/bench/makefile | 4 +- reactos/apps/tests/bitblt/bitblt.c | 1 + reactos/apps/tests/bitblt/makefile | 2 + reactos/apps/tests/button/Makefile | 2 + reactos/apps/tests/button/buttontst.c | 1 - reactos/apps/tests/button2/Makefile | 2 + reactos/apps/tests/button2/buttontst2.c | 4 +- reactos/apps/tests/capclock/Makefile | 2 + reactos/apps/tests/capclock/capclock.c | 3 +- reactos/apps/tests/carets/carets.c | 4 +- reactos/apps/tests/carets/makefile | 4 +- reactos/apps/tests/cliarea/cliarea.c | 11 +- reactos/apps/tests/cliarea/makefile | 4 +- reactos/apps/tests/combo/combotst.c | 122 +++++++-------- reactos/apps/tests/combo/makefile | 3 + reactos/apps/tests/consume/Makefile | 4 +- reactos/apps/tests/copymove/Makefile | 4 +- reactos/apps/tests/copymove/copymove.c | 43 +++--- reactos/apps/tests/count/Makefile | 4 +- reactos/apps/tests/count/count.c | 4 +- reactos/apps/tests/dibtest/dibtest.c | 4 +- reactos/apps/tests/dibtest/makefile | 4 +- .../tests/dump_shared_data/dump_shared_data.c | 3 +- reactos/apps/tests/dump_shared_data/makefile | 4 +- reactos/apps/tests/edit/edittest.c | 104 ++++++------- reactos/apps/tests/edit/makefile | 2 + reactos/apps/tests/enumwnd/enumwnd.c | 4 +- reactos/apps/tests/enumwnd/makefile | 4 +- reactos/apps/tests/event/makefile | 4 +- reactos/apps/tests/eventpair/eventpair.c | 18 +-- reactos/apps/tests/eventpair/makefile | 4 +- reactos/apps/tests/file/Makefile | 4 +- reactos/apps/tests/file/file.c | 6 +- reactos/apps/tests/gditest/gditest.c | 35 +++-- reactos/apps/tests/gditest/makefile | 4 +- reactos/apps/tests/global_mem/Makefile | 4 +- reactos/apps/tests/global_mem/global_mem.c | 16 +- reactos/apps/tests/hello/makefile | 4 +- reactos/apps/tests/hivetest/hivetest.c | 22 +-- reactos/apps/tests/hivetest/makefile | 4 +- reactos/apps/tests/hotkey/hotkey.c | 7 +- reactos/apps/tests/hotkey/makefile | 4 +- reactos/apps/tests/icontest/icontest.c | 6 +- reactos/apps/tests/icontest/makefile | 2 + reactos/apps/tests/isotest/isotest.c | 3 +- reactos/apps/tests/isotest/makefile | 4 +- reactos/apps/tests/lineclip/lineclip.c | 7 +- reactos/apps/tests/lineclip/makefile | 4 +- reactos/apps/tests/linetest/linetest.c | 6 +- reactos/apps/tests/linetest/makefile | 4 +- reactos/apps/tests/lock/Makefile | 4 +- reactos/apps/tests/lock/lock.c | 6 +- reactos/apps/tests/lpc/makefile | 2 +- reactos/apps/tests/map_dup_inherit/makefile | 4 +- .../tests/map_dup_inherit/map_dup_inherit.c | 22 +-- reactos/apps/tests/messagebox/makefile | 2 + reactos/apps/tests/mktime/makefile | 4 +- reactos/apps/tests/mktime/mktime.c | 3 +- reactos/apps/tests/mstest/Makefile | 2 +- reactos/apps/tests/multiwin/makefile | 4 +- reactos/apps/tests/multiwin/multiwin.c | 4 +- reactos/apps/tests/mutex/makefile | 4 +- reactos/apps/tests/nptest/Makefile | 2 +- reactos/apps/tests/p_dup_handle/makefile | 4 +- .../apps/tests/p_dup_handle/p_dup_handle.c | 16 +- reactos/apps/tests/palbitblt/makefile | 3 +- reactos/apps/tests/patblt/makefile | 4 +- reactos/apps/tests/pipe/Makefile | 2 +- reactos/apps/tests/pipe/pipe.c | 3 + reactos/apps/tests/primitives/Makefile | 4 +- reactos/apps/tests/pteb/Makefile | 4 +- reactos/apps/tests/pteb/pteb.c | 6 +- reactos/apps/tests/regdump/makefile | 2 + reactos/apps/tests/regtest/makefile | 4 +- reactos/apps/tests/regtest/regtest.c | 12 +- reactos/apps/tests/sectest/Makefile | 4 +- reactos/apps/tests/sectest/sectest.c | 144 +++++++++--------- reactos/apps/tests/sertest/makefile | 2 + reactos/apps/tests/sertest/sertest.c | 29 ++-- reactos/apps/tests/shaptest/makefile | 4 +- reactos/apps/tests/shm/makefile | 2 +- reactos/apps/tests/statst/Makefile | 3 +- reactos/apps/tests/statst2/Makefile | 2 + reactos/apps/tests/stretchblt/makefile | 4 +- reactos/apps/tests/stretchblt/stretchblt.cpp | 4 + reactos/apps/tests/subclass/makefile | 4 +- reactos/apps/tests/suspend/Makefile | 4 +- reactos/apps/tests/suspend/suspend.c | 5 +- reactos/apps/tests/tcpsvr/makefile | 4 +- reactos/apps/tests/tcpsvr/tcpsvr.c | 2 + reactos/apps/tests/terminate/Makefile | 4 +- reactos/apps/tests/terminate/terminate.c | 1 + .../apps/tests/tests/GetSysMetrics/Makefile | 2 + .../apps/tests/tests/GetSystemInfo/Makefile | 2 +- .../apps/tests/tests/Parent_Child/Makefile | 2 +- reactos/apps/tests/tests/guitest/Makefile | 2 +- reactos/apps/tests/tests/hello/Makefile | 2 +- reactos/apps/tests/tests/new/Makefile | 2 +- reactos/apps/tests/tests/rolex/Makefile | 2 +- reactos/apps/tests/tests/volinfo/Makefile | 2 + reactos/apps/tests/thread/makefile | 4 +- reactos/apps/tests/thread/thread.c | 3 +- reactos/apps/tests/thread_msg/makefile | 4 +- reactos/apps/tests/thread_msg/thread_msg.c | 4 +- reactos/apps/tests/threadwait/makefile | 4 +- reactos/apps/tests/threadwait/threadwait.c | 2 +- reactos/apps/tests/tokentest/makefile | 4 +- reactos/apps/tests/tokentest/tokentest.c | 13 +- reactos/apps/tests/txtscale/Makefile | 4 +- reactos/apps/tests/vmtest/Makefile | 4 +- reactos/apps/tests/vmtest/vmtest.c | 1 + reactos/apps/tests/winhello/makefile | 4 +- reactos/apps/tests/winhello/winhello.c | 9 +- reactos/apps/tests/winhello2/makefile | 4 +- reactos/apps/tests/winhello2/winhello2.c | 10 +- reactos/apps/tests/wm_erasebkgnd/makefile | 4 +- .../tests/wm_erasebkgnd/wm_erasebkgnd.cpp | 4 + reactos/apps/tests/wm_paint/makefile | 2 + reactos/apps/tests/wm_paint/wm_paint.c | 1 + reactos/apps/testsets/loadlib/loadlib.c | 4 +- reactos/apps/testsets/loadlib/makefile | 2 + reactos/apps/utils/cat/makefile | 4 +- reactos/apps/utils/consw/consw.c | 3 +- reactos/apps/utils/consw/makefile | 4 +- reactos/apps/utils/partinfo/makefile | 4 +- reactos/apps/utils/sc/makefile | 2 +- reactos/apps/utils/stats/Makefile | 4 +- reactos/apps/utils/stats/stats.c | 14 +- reactos/apps/utils/tickcount/makefile | 2 + reactos/drivers/bus/acpi/events/evxfregn.c | 8 +- reactos/drivers/bus/acpi/ospm/acpienum.c | 4 +- reactos/drivers/bus/acpi/ospm/fdo.c | 5 +- reactos/drivers/bus/acpi/ospm/osl.c | 2 - reactos/drivers/bus/acpi/ospm/pdo.c | 5 +- reactos/drivers/bus/isapnp/isapnp.c | 9 +- reactos/drivers/bus/isapnp/makefile | 4 +- reactos/drivers/bus/pci/makefile | 4 +- reactos/drivers/bus/pci/pci.c | 14 +- reactos/drivers/bus/pci/pci.h | 9 +- reactos/drivers/dd/bootvid/Makefile | 4 +- reactos/drivers/dd/bootvid/bootvid.c | 3 +- reactos/drivers/dd/debugout/makefile | 4 +- reactos/drivers/dd/ide/makefile | 4 +- reactos/drivers/dd/serial/makefile | 4 +- reactos/drivers/dd/serial/serial.c | 3 +- reactos/drivers/dd/vga/display/main/enable.c | 8 +- reactos/drivers/dd/vga/display/makefile | 4 +- .../drivers/dd/vga/display/objects/bitblt.c | 21 ++- .../drivers/dd/vga/display/objects/lineto.c | 3 +- .../drivers/dd/vga/display/objects/paint.c | 4 +- .../drivers/dd/vga/display/objects/pointer.c | 7 +- .../drivers/dd/vga/display/objects/screen.c | 4 - reactos/drivers/dd/vga/display/vgaddi.h | 5 + .../dd/vga/display/vgavideo/vgavideo.c | 9 +- .../dd/vga/display/vgavideo/vgavideo.h | 4 + reactos/drivers/dd/vga/miniport/initvga.c | 2 - reactos/drivers/dd/vga/miniport/makefile | 4 +- reactos/drivers/dd/vga/miniport/vgamp.c | 2 +- reactos/drivers/input/keyboard/keyboard.c | 1 - reactos/drivers/input/keyboard/makefile | 4 +- reactos/drivers/input/mouclass/makefile | 4 +- reactos/drivers/input/mouclass/mouclass.c | 2 - reactos/drivers/input/psaux/controller.c | 1 + reactos/drivers/input/psaux/controller.h | 1 + reactos/drivers/input/psaux/logips2pp.c | 2 +- reactos/drivers/input/psaux/makefile | 4 +- reactos/drivers/input/psaux/mouse.c | 9 +- reactos/drivers/input/psaux/mouse.h | 13 +- reactos/drivers/input/psaux/psaux.c | 10 +- reactos/drivers/input/sermouse/makefile | 4 +- reactos/drivers/lib/bzip2/Makefile | 4 +- reactos/drivers/net/afd/afd/dispatch.c | 2 - reactos/drivers/net/afd/afd/event.c | 1 - reactos/drivers/net/afd/afd/opnclose.c | 1 - reactos/drivers/net/afd/afd/rdwr.c | 1 - reactos/drivers/net/afd/afd/routines.c | 3 - reactos/drivers/net/afd/afd/tdi.c | 1 - reactos/drivers/net/afd/makefile | 4 +- reactos/drivers/net/dd/ne2000/Makefile | 4 +- reactos/drivers/net/ndis/Makefile | 4 +- reactos/drivers/net/npf/Makefile | 4 +- reactos/drivers/net/npf/dump.c | 15 +- reactos/drivers/net/npf/jitter.h | 34 ++--- reactos/drivers/net/npf/openclos.c | 2 - reactos/drivers/net/npf/packet.c | 18 --- reactos/drivers/net/npf/read.c | 5 - reactos/drivers/net/npf/tcp_session.c | 4 + reactos/drivers/net/npf/time_calls.c | 4 - reactos/drivers/net/npf/write.c | 4 +- reactos/drivers/net/tdi/Makefile | 4 +- reactos/drivers/net/tdi/tdi/dereg.c | 10 +- reactos/drivers/net/wshtcpip/makefile | 4 +- reactos/hal/hal/Makefile | 4 +- reactos/iface/addsys/makefile | 4 +- reactos/iface/native/makefile | 4 +- reactos/include/msvcrt/wchar.h | 8 +- reactos/lib/crtdll/except/abnorter.c | 3 +- reactos/lib/crtdll/makefile | 4 +- reactos/lib/crtdll/process/spawnve.c | 1 + reactos/lib/crtdll/signal/xcptfil.c | 1 + reactos/lib/crtdll/sys_stat/stat.c | 2 +- reactos/lib/crtdll/sys_stat/systime.c | 2 - reactos/lib/d3d8thk/Makefile | 2 +- reactos/lib/iphlpapi/iphlpapi.c | 6 +- reactos/lib/iphlpapi/makefile | 2 +- reactos/lib/msimg32/Makefile | 2 +- reactos/lib/msvcrt/Makefile | 4 +- reactos/lib/msvcrt/except/abnorter.c | 3 +- reactos/lib/msvcrt/except/unwind.c | 5 + reactos/lib/msvcrt/except/xcptfil.c | 1 + reactos/lib/msvcrt/io/write.c | 1 + reactos/lib/msvcrt/mbstring/mbsrev.c | 4 +- reactos/lib/msvcrt/misc/cpp.c | 8 +- reactos/lib/msvcrt/misc/environ.c | 3 +- reactos/lib/msvcrt/misc/initterm.c | 1 + reactos/lib/msvcrt/process/thread.c | 3 +- reactos/lib/msvcrt/process/threadx.c | 3 +- reactos/lib/msvcrt/stdio/vfprintf.c | 2 +- reactos/lib/msvcrt/stdio/vfwprint.c | 2 +- reactos/lib/msvcrt/stdlib/mbstowcs.c | 2 + reactos/lib/msvcrt/stdlib/strtol.c | 1 + reactos/lib/msvcrt/stdlib/strtoul.c | 1 + reactos/lib/msvcrt/stdlib/wcstol.c | 1 + reactos/lib/msvcrt/stdlib/wcstomb.c | 10 +- reactos/lib/msvcrt/stdlib/wcstombs.c | 8 +- reactos/lib/msvcrt/stdlib/wcstoul.c | 1 + reactos/lib/packet/Packet32.c | 10 +- reactos/lib/packet/makefile | 4 +- reactos/lib/packet/trace.c | 6 +- reactos/lib/richedit/Makefile | 2 +- reactos/lib/winedbgc/Makefile | 4 +- reactos/lib/winedbgc/debug.c | 7 +- reactos/lib/winedbgc/trace.c | 4 +- reactos/lib/winedbgc/trace.h | 4 +- reactos/lib/winedbgc/winedbgc.c | 2 +- reactos/lib/winedbgc/winedbgc.dll.dbg.c | 2 - reactos/ntoskrnl/mm/freelist.c | 2 +- reactos/services/eventlog/eventlog.c | 5 +- reactos/services/eventlog/logport.c | 4 +- reactos/services/eventlog/makefile | 4 +- reactos/services/rpcss/makefile | 4 +- reactos/services/rpcss/rpcss.c | 5 +- reactos/services/rpcss/rpcss.h | 3 +- reactos/subsys/ntvdm/makefile | 4 +- reactos/subsys/ntvdm/ntvdm.c | 5 +- reactos/subsys/smss/init.c | 3 +- reactos/subsys/smss/makefile | 4 +- reactos/subsys/system/autochk/makefile | 4 +- reactos/subsys/system/format/format.c | 29 +++- reactos/subsys/system/format/makefile | 4 +- reactos/subsys/system/gstart/Makefile | 4 +- reactos/subsys/system/services/database.c | 4 +- reactos/subsys/system/services/makefile | 4 +- reactos/subsys/system/setup/makefile | 4 +- reactos/subsys/system/usetup/cabinet.c | 16 +- reactos/subsys/system/usetup/console.c | 6 - reactos/subsys/system/usetup/console.h | 11 ++ reactos/subsys/system/usetup/infcache.c | 3 +- reactos/subsys/system/usetup/inicache.c | 9 +- reactos/subsys/system/usetup/makefile | 4 +- reactos/subsys/system/usetup/partlist.c | 11 +- reactos/subsys/system/usetup/progress.c | 2 +- reactos/subsys/system/usetup/registry.c | 3 +- reactos/subsys/system/usetup/usetup.c | 15 +- reactos/subsys/system/welcome/Makefile | 4 +- reactos/subsys/system/winlogon/makefile | 4 +- reactos/subsys/system/winlogon/winlogon.c | 9 +- reactos/tools/Makefile | 2 + reactos/tools/buildno.c | 3 +- reactos/tools/cabman/cabinet.cxx | 75 ++++++--- reactos/tools/cabman/cabinet.h | 30 ---- reactos/tools/cabman/dfp.cxx | 52 ++++++- reactos/tools/cabman/main.cxx | 8 +- reactos/tools/cabman/makefile | 2 +- reactos/tools/cabman/makefile.win32 | 4 +- reactos/tools/cdmake/Makefile | 2 +- reactos/tools/create_nls/Makefile | 2 +- reactos/tools/mkhive/Makefile | 2 +- reactos/tools/mkhive/binhive.c | 5 +- reactos/tools/mkhive/infcache.c | 4 +- reactos/tools/mkhive/mkhive.c | 3 +- reactos/tools/mkhive/reginf.c | 3 +- reactos/tools/mkhive/registry.c | 3 +- reactos/tools/rcopy.c | 2 - reactos/tools/regtests.c | 2 - reactos/tools/rgenstat/Makefile | 2 +- reactos/tools/rgenstat/rgenstat.c | 3 - reactos/tools/rline.c | 1 - reactos/tools/rmkdir.c | 5 +- reactos/tools/rsym.c | 1 - reactos/tools/rtouch.c | 4 +- reactos/tools/wmc/getopt.c | 3 +- reactos/tools/wmc/makefile | 2 +- 301 files changed, 1075 insertions(+), 899 deletions(-) diff --git a/reactos/apps/tests/SampleWindow/makefile b/reactos/apps/tests/SampleWindow/makefile index 7b454e5eaf4..437970fe93f 100644 --- a/reactos/apps/tests/SampleWindow/makefile +++ b/reactos/apps/tests/SampleWindow/makefile @@ -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 diff --git a/reactos/apps/tests/alive/Makefile b/reactos/apps/tests/alive/Makefile index 705ba09ad94..4681416cced 100644 --- a/reactos/apps/tests/alive/Makefile +++ b/reactos/apps/tests/alive/Makefile @@ -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 diff --git a/reactos/apps/tests/apc/makefile b/reactos/apps/tests/apc/makefile index fadc439faff..19cf9c3184a 100644 --- a/reactos/apps/tests/apc/makefile +++ b/reactos/apps/tests/apc/makefile @@ -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 diff --git a/reactos/apps/tests/apc2/apc2.c b/reactos/apps/tests/apc2/apc2.c index c6529fac6ab..739fc181984 100644 --- a/reactos/apps/tests/apc2/apc2.c +++ b/reactos/apps/tests/apc2/apc2.c @@ -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 +} + diff --git a/reactos/apps/tests/apc2/makefile b/reactos/apps/tests/apc2/makefile index c48f70035f6..50ea5606cba 100644 --- a/reactos/apps/tests/apc2/makefile +++ b/reactos/apps/tests/apc2/makefile @@ -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 diff --git a/reactos/apps/tests/args/makefile b/reactos/apps/tests/args/makefile index fc2f3a83f7e..d0cb8156ae2 100644 --- a/reactos/apps/tests/args/makefile +++ b/reactos/apps/tests/args/makefile @@ -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 diff --git a/reactos/apps/tests/atomtest/makefile b/reactos/apps/tests/atomtest/makefile index 5099d72aa8a..1fdf6ea6d11 100644 --- a/reactos/apps/tests/atomtest/makefile +++ b/reactos/apps/tests/atomtest/makefile @@ -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 diff --git a/reactos/apps/tests/bench/bench-thread.c b/reactos/apps/tests/bench/bench-thread.c index ae17b2b963d..6648a254b8a 100644 --- a/reactos/apps/tests/bench/bench-thread.c +++ b/reactos/apps/tests/bench/bench-thread.c @@ -24,7 +24,6 @@ thread_main2(LPVOID param) int main (void) { - HANDLE hThread; DWORD i=0; DWORD id; diff --git a/reactos/apps/tests/bench/makefile b/reactos/apps/tests/bench/makefile index a9424ed341f..f16c9c70b7e 100644 --- a/reactos/apps/tests/bench/makefile +++ b/reactos/apps/tests/bench/makefile @@ -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 diff --git a/reactos/apps/tests/bitblt/bitblt.c b/reactos/apps/tests/bitblt/bitblt.c index 704e8fa020c..b538f7c176e 100644 --- a/reactos/apps/tests/bitblt/bitblt.c +++ b/reactos/apps/tests/bitblt/bitblt.c @@ -12,6 +12,7 @@ #include +#include HINSTANCE HInst; const char* WndClassName = "GMainWnd"; diff --git a/reactos/apps/tests/bitblt/makefile b/reactos/apps/tests/bitblt/makefile index bc1acb1a907..a27f7676228 100644 --- a/reactos/apps/tests/bitblt/makefile +++ b/reactos/apps/tests/bitblt/makefile @@ -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 diff --git a/reactos/apps/tests/button/Makefile b/reactos/apps/tests/button/Makefile index bdfc46f5548..44e44d42c01 100644 --- a/reactos/apps/tests/button/Makefile +++ b/reactos/apps/tests/button/Makefile @@ -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 diff --git a/reactos/apps/tests/button/buttontst.c b/reactos/apps/tests/button/buttontst.c index 58ea4f66c04..c12887b6aee 100644 --- a/reactos/apps/tests/button/buttontst.c +++ b/reactos/apps/tests/button/buttontst.c @@ -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, diff --git a/reactos/apps/tests/button2/Makefile b/reactos/apps/tests/button2/Makefile index 6f5b5b2e5e9..edac2e444bb 100644 --- a/reactos/apps/tests/button2/Makefile +++ b/reactos/apps/tests/button2/Makefile @@ -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 diff --git a/reactos/apps/tests/button2/buttontst2.c b/reactos/apps/tests/button2/buttontst2.c index 48bb5a2bc7b..b16c905e1aa 100644 --- a/reactos/apps/tests/button2/buttontst2.c +++ b/reactos/apps/tests/button2/buttontst2.c @@ -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); } diff --git a/reactos/apps/tests/capclock/Makefile b/reactos/apps/tests/capclock/Makefile index 0e849b80fc6..d4a9d4c8f2e 100644 --- a/reactos/apps/tests/capclock/Makefile +++ b/reactos/apps/tests/capclock/Makefile @@ -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 diff --git a/reactos/apps/tests/capclock/capclock.c b/reactos/apps/tests/capclock/capclock.c index 629e231ed9b..077ce096fc4 100644 --- a/reactos/apps/tests/capclock/capclock.c +++ b/reactos/apps/tests/capclock/capclock.c @@ -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 +#include UINT Timer = 1; diff --git a/reactos/apps/tests/carets/carets.c b/reactos/apps/tests/carets/carets.c index 3c71e5c0470..49007810578 100644 --- a/reactos/apps/tests/carets/carets.c +++ b/reactos/apps/tests/carets/carets.c @@ -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); } diff --git a/reactos/apps/tests/carets/makefile b/reactos/apps/tests/carets/makefile index a5f1c33e7c4..8bed0395a88 100644 --- a/reactos/apps/tests/carets/makefile +++ b/reactos/apps/tests/carets/makefile @@ -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 diff --git a/reactos/apps/tests/cliarea/cliarea.c b/reactos/apps/tests/cliarea/cliarea.c index f74f7eb5eda..d109231726a 100644 --- a/reactos/apps/tests/cliarea/cliarea.c +++ b/reactos/apps/tests/cliarea/cliarea.c @@ -1,6 +1,6 @@ #include #include - +#include //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; diff --git a/reactos/apps/tests/cliarea/makefile b/reactos/apps/tests/cliarea/makefile index b8cce1a50d6..3a6cd07ebc4 100644 --- a/reactos/apps/tests/cliarea/makefile +++ b/reactos/apps/tests/cliarea/makefile @@ -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 diff --git a/reactos/apps/tests/combo/combotst.c b/reactos/apps/tests/combo/combotst.c index b8610d9edaf..f99fc87da91 100644 --- a/reactos/apps/tests/combo/combotst.c +++ b/reactos/apps/tests/combo/combotst.c @@ -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. diff --git a/reactos/apps/tests/combo/makefile b/reactos/apps/tests/combo/makefile index 195251f5174..441f7326112 100644 --- a/reactos/apps/tests/combo/makefile +++ b/reactos/apps/tests/combo/makefile @@ -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 diff --git a/reactos/apps/tests/consume/Makefile b/reactos/apps/tests/consume/Makefile index 45cf5cd06a1..3ea20d7ddb9 100644 --- a/reactos/apps/tests/consume/Makefile +++ b/reactos/apps/tests/consume/Makefile @@ -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 diff --git a/reactos/apps/tests/copymove/Makefile b/reactos/apps/tests/copymove/Makefile index 41c8ba2e8d4..5bd5b47741d 100644 --- a/reactos/apps/tests/copymove/Makefile +++ b/reactos/apps/tests/copymove/Makefile @@ -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 diff --git a/reactos/apps/tests/copymove/copymove.c b/reactos/apps/tests/copymove/copymove.c index 81c4a2ee15b..f938368b8bc 100644 --- a/reactos/apps/tests/copymove/copymove.c +++ b/reactos/apps/tests/copymove/copymove.c @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -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); diff --git a/reactos/apps/tests/count/Makefile b/reactos/apps/tests/count/Makefile index f5dec847431..ce36e61fe66 100644 --- a/reactos/apps/tests/count/Makefile +++ b/reactos/apps/tests/count/Makefile @@ -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 diff --git a/reactos/apps/tests/count/count.c b/reactos/apps/tests/count/count.c index 48715d99eee..f3db81bd43f 100644 --- a/reactos/apps/tests/count/count.c +++ b/reactos/apps/tests/count/count.c @@ -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 +#include int n = 0; diff --git a/reactos/apps/tests/dibtest/dibtest.c b/reactos/apps/tests/dibtest/dibtest.c index 78880327986..27ce8091614 100644 --- a/reactos/apps/tests/dibtest/dibtest.c +++ b/reactos/apps/tests/dibtest/dibtest.c @@ -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); } diff --git a/reactos/apps/tests/dibtest/makefile b/reactos/apps/tests/dibtest/makefile index cda8cea1ec7..cb384832982 100644 --- a/reactos/apps/tests/dibtest/makefile +++ b/reactos/apps/tests/dibtest/makefile @@ -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 diff --git a/reactos/apps/tests/dump_shared_data/dump_shared_data.c b/reactos/apps/tests/dump_shared_data/dump_shared_data.c index 0b4a9e808ed..6ae2aeb0d9e 100644 --- a/reactos/apps/tests/dump_shared_data/dump_shared_data.c +++ b/reactos/apps/tests/dump_shared_data/dump_shared_data.c @@ -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; } diff --git a/reactos/apps/tests/dump_shared_data/makefile b/reactos/apps/tests/dump_shared_data/makefile index 11946663067..022d2470951 100644 --- a/reactos/apps/tests/dump_shared_data/makefile +++ b/reactos/apps/tests/dump_shared_data/makefile @@ -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 diff --git a/reactos/apps/tests/edit/edittest.c b/reactos/apps/tests/edit/edittest.c index 9a792ebd46c..723464651c8 100644 --- a/reactos/apps/tests/edit/edittest.c +++ b/reactos/apps/tests/edit/edittest.c @@ -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, diff --git a/reactos/apps/tests/edit/makefile b/reactos/apps/tests/edit/makefile index 04a37249600..c327d112943 100644 --- a/reactos/apps/tests/edit/makefile +++ b/reactos/apps/tests/edit/makefile @@ -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 diff --git a/reactos/apps/tests/enumwnd/enumwnd.c b/reactos/apps/tests/enumwnd/enumwnd.c index 0857d1bd72e..c5b60ef6a03 100644 --- a/reactos/apps/tests/enumwnd/enumwnd.c +++ b/reactos/apps/tests/enumwnd/enumwnd.c @@ -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); } diff --git a/reactos/apps/tests/enumwnd/makefile b/reactos/apps/tests/enumwnd/makefile index fbacd2ae3c2..b289471a0ec 100644 --- a/reactos/apps/tests/enumwnd/makefile +++ b/reactos/apps/tests/enumwnd/makefile @@ -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 diff --git a/reactos/apps/tests/event/makefile b/reactos/apps/tests/event/makefile index 220903cd8da..a8a0277d64c 100644 --- a/reactos/apps/tests/event/makefile +++ b/reactos/apps/tests/event/makefile @@ -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 diff --git a/reactos/apps/tests/eventpair/eventpair.c b/reactos/apps/tests/eventpair/eventpair.c index c438421b43b..f20a725a7f9 100644 --- a/reactos/apps/tests/eventpair/eventpair.c +++ b/reactos/apps/tests/eventpair/eventpair.c @@ -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); diff --git a/reactos/apps/tests/eventpair/makefile b/reactos/apps/tests/eventpair/makefile index 40c0394da39..282845953b8 100644 --- a/reactos/apps/tests/eventpair/makefile +++ b/reactos/apps/tests/eventpair/makefile @@ -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 diff --git a/reactos/apps/tests/file/Makefile b/reactos/apps/tests/file/Makefile index 152b8ec1588..15dc8754bb4 100644 --- a/reactos/apps/tests/file/Makefile +++ b/reactos/apps/tests/file/Makefile @@ -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 diff --git a/reactos/apps/tests/file/file.c b/reactos/apps/tests/file/file.c index 27f716eb5f4..f803fb45e6c 100644 --- a/reactos/apps/tests/file/file.c +++ b/reactos/apps/tests/file/file.c @@ -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++ ) diff --git a/reactos/apps/tests/gditest/gditest.c b/reactos/apps/tests/gditest/gditest.c index 4a8cd1b1614..4b6888f8826 100644 --- a/reactos/apps/tests/gditest/gditest.c +++ b/reactos/apps/tests/gditest/gditest.c @@ -4,6 +4,9 @@ */ #include +#include +#include +#include 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 ); diff --git a/reactos/apps/tests/gditest/makefile b/reactos/apps/tests/gditest/makefile index 04c9b7b257b..3502a25c01b 100644 --- a/reactos/apps/tests/gditest/makefile +++ b/reactos/apps/tests/gditest/makefile @@ -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 diff --git a/reactos/apps/tests/global_mem/Makefile b/reactos/apps/tests/global_mem/Makefile index 2bd3e1368f8..14c5b5b32c5 100644 --- a/reactos/apps/tests/global_mem/Makefile +++ b/reactos/apps/tests/global_mem/Makefile @@ -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 diff --git a/reactos/apps/tests/global_mem/global_mem.c b/reactos/apps/tests/global_mem/global_mem.c index eb0a76a0241..b9cb7149871 100644 --- a/reactos/apps/tests/global_mem/global_mem.c +++ b/reactos/apps/tests/global_mem/global_mem.c @@ -7,6 +7,7 @@ */ #include #include +#include /* ** 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); diff --git a/reactos/apps/tests/hello/makefile b/reactos/apps/tests/hello/makefile index 3221d2309fd..a7cb506069e 100644 --- a/reactos/apps/tests/hello/makefile +++ b/reactos/apps/tests/hello/makefile @@ -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 diff --git a/reactos/apps/tests/hivetest/hivetest.c b/reactos/apps/tests/hivetest/hivetest.c index 8ace59c54d3..e941180990a 100644 --- a/reactos/apps/tests/hivetest/hivetest.c +++ b/reactos/apps/tests/hivetest/hivetest.c @@ -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"); diff --git a/reactos/apps/tests/hivetest/makefile b/reactos/apps/tests/hivetest/makefile index 80e2a6376ac..a28e17f448c 100644 --- a/reactos/apps/tests/hivetest/makefile +++ b/reactos/apps/tests/hivetest/makefile @@ -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 diff --git a/reactos/apps/tests/hotkey/hotkey.c b/reactos/apps/tests/hotkey/hotkey.c index ba805b7fe2c..63c1d92c07c 100644 --- a/reactos/apps/tests/hotkey/hotkey.c +++ b/reactos/apps/tests/hotkey/hotkey.c @@ -1,5 +1,6 @@ #include #include +#include //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) { diff --git a/reactos/apps/tests/hotkey/makefile b/reactos/apps/tests/hotkey/makefile index 60fed36a2fa..2199ebac266 100644 --- a/reactos/apps/tests/hotkey/makefile +++ b/reactos/apps/tests/hotkey/makefile @@ -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 diff --git a/reactos/apps/tests/icontest/icontest.c b/reactos/apps/tests/icontest/icontest.c index 52924fd3a4f..e93adcf4323 100644 --- a/reactos/apps/tests/icontest/icontest.c +++ b/reactos/apps/tests/icontest/icontest.c @@ -1,5 +1,7 @@ #include #include "resource.h" +#include +#include #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) diff --git a/reactos/apps/tests/icontest/makefile b/reactos/apps/tests/icontest/makefile index de02a8aa57b..39dd5cec5e5 100644 --- a/reactos/apps/tests/icontest/makefile +++ b/reactos/apps/tests/icontest/makefile @@ -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 diff --git a/reactos/apps/tests/isotest/isotest.c b/reactos/apps/tests/isotest/isotest.c index 684cc334d89..bfba7f99c5e 100644 --- a/reactos/apps/tests/isotest/isotest.c +++ b/reactos/apps/tests/isotest/isotest.c @@ -6,6 +6,8 @@ //#include #include #include +#include +#include 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; diff --git a/reactos/apps/tests/isotest/makefile b/reactos/apps/tests/isotest/makefile index 2a9a155d96a..6a8be725368 100644 --- a/reactos/apps/tests/isotest/makefile +++ b/reactos/apps/tests/isotest/makefile @@ -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 diff --git a/reactos/apps/tests/lineclip/lineclip.c b/reactos/apps/tests/lineclip/lineclip.c index e1e862ecee2..3fba19c3d31 100644 --- a/reactos/apps/tests/lineclip/lineclip.c +++ b/reactos/apps/tests/lineclip/lineclip.c @@ -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) diff --git a/reactos/apps/tests/lineclip/makefile b/reactos/apps/tests/lineclip/makefile index ec106b86fc1..1be45250e2d 100644 --- a/reactos/apps/tests/lineclip/makefile +++ b/reactos/apps/tests/lineclip/makefile @@ -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 diff --git a/reactos/apps/tests/linetest/linetest.c b/reactos/apps/tests/linetest/linetest.c index 172839de834..f6da86da14b 100644 --- a/reactos/apps/tests/linetest/linetest.c +++ b/reactos/apps/tests/linetest/linetest.c @@ -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) { diff --git a/reactos/apps/tests/linetest/makefile b/reactos/apps/tests/linetest/makefile index f6c0c103111..1f7272142ff 100644 --- a/reactos/apps/tests/linetest/makefile +++ b/reactos/apps/tests/linetest/makefile @@ -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 diff --git a/reactos/apps/tests/lock/Makefile b/reactos/apps/tests/lock/Makefile index f7129b5f805..12880ee4cc8 100644 --- a/reactos/apps/tests/lock/Makefile +++ b/reactos/apps/tests/lock/Makefile @@ -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 diff --git a/reactos/apps/tests/lock/lock.c b/reactos/apps/tests/lock/lock.c index cbafdb5fe8d..8d85c843548 100644 --- a/reactos/apps/tests/lock/lock.c +++ b/reactos/apps/tests/lock/lock.c @@ -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; } diff --git a/reactos/apps/tests/lpc/makefile b/reactos/apps/tests/lpc/makefile index 6259c9256f7..f69811729ac 100644 --- a/reactos/apps/tests/lpc/makefile +++ b/reactos/apps/tests/lpc/makefile @@ -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 diff --git a/reactos/apps/tests/map_dup_inherit/makefile b/reactos/apps/tests/map_dup_inherit/makefile index c7d945a3f6e..e93605e64f7 100644 --- a/reactos/apps/tests/map_dup_inherit/makefile +++ b/reactos/apps/tests/map_dup_inherit/makefile @@ -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 diff --git a/reactos/apps/tests/map_dup_inherit/map_dup_inherit.c b/reactos/apps/tests/map_dup_inherit/map_dup_inherit.c index ab112c8e961..2abd2cac14b 100644 --- a/reactos/apps/tests/map_dup_inherit/map_dup_inherit.c +++ b/reactos/apps/tests/map_dup_inherit/map_dup_inherit.c @@ -1,5 +1,7 @@ #include #include +#include +#include /* 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; } diff --git a/reactos/apps/tests/messagebox/makefile b/reactos/apps/tests/messagebox/makefile index 6c9d251330d..248808de365 100644 --- a/reactos/apps/tests/messagebox/makefile +++ b/reactos/apps/tests/messagebox/makefile @@ -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 diff --git a/reactos/apps/tests/mktime/makefile b/reactos/apps/tests/mktime/makefile index d375f3780e0..f0116f5ce39 100644 --- a/reactos/apps/tests/mktime/makefile +++ b/reactos/apps/tests/mktime/makefile @@ -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 diff --git a/reactos/apps/tests/mktime/mktime.c b/reactos/apps/tests/mktime/mktime.c index f38b91ed17e..f5cf40bb2a9 100644 --- a/reactos/apps/tests/mktime/mktime.c +++ b/reactos/apps/tests/mktime/mktime.c @@ -25,4 +25,5 @@ int main(void) (void)puts(daybuf); } return 0; -} \ No newline at end of file +} + diff --git a/reactos/apps/tests/mstest/Makefile b/reactos/apps/tests/mstest/Makefile index a38651126ef..2b369c08e9d 100644 --- a/reactos/apps/tests/mstest/Makefile +++ b/reactos/apps/tests/mstest/Makefile @@ -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 diff --git a/reactos/apps/tests/multiwin/makefile b/reactos/apps/tests/multiwin/makefile index 889dc7cdd0f..4d67980563c 100644 --- a/reactos/apps/tests/multiwin/makefile +++ b/reactos/apps/tests/multiwin/makefile @@ -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 diff --git a/reactos/apps/tests/multiwin/multiwin.c b/reactos/apps/tests/multiwin/multiwin.c index 389b80e579a..12b6b26a5bc 100644 --- a/reactos/apps/tests/multiwin/multiwin.c +++ b/reactos/apps/tests/multiwin/multiwin.c @@ -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); } diff --git a/reactos/apps/tests/mutex/makefile b/reactos/apps/tests/mutex/makefile index 926ecc303b5..0da7ad5b6a9 100644 --- a/reactos/apps/tests/mutex/makefile +++ b/reactos/apps/tests/mutex/makefile @@ -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 diff --git a/reactos/apps/tests/nptest/Makefile b/reactos/apps/tests/nptest/Makefile index f19655a5c40..ed9db5869b0 100644 --- a/reactos/apps/tests/nptest/Makefile +++ b/reactos/apps/tests/nptest/Makefile @@ -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 diff --git a/reactos/apps/tests/p_dup_handle/makefile b/reactos/apps/tests/p_dup_handle/makefile index 3ab26c19c3f..2dd34de5869 100644 --- a/reactos/apps/tests/p_dup_handle/makefile +++ b/reactos/apps/tests/p_dup_handle/makefile @@ -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 diff --git a/reactos/apps/tests/p_dup_handle/p_dup_handle.c b/reactos/apps/tests/p_dup_handle/p_dup_handle.c index 15385bbcf1d..6aa5f7d1c05 100644 --- a/reactos/apps/tests/p_dup_handle/p_dup_handle.c +++ b/reactos/apps/tests/p_dup_handle/p_dup_handle.c @@ -1,5 +1,7 @@ #include #include +#include +#include /* 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; } diff --git a/reactos/apps/tests/palbitblt/makefile b/reactos/apps/tests/palbitblt/makefile index 28b00d22ac5..a7edc024065 100644 --- a/reactos/apps/tests/palbitblt/makefile +++ b/reactos/apps/tests/palbitblt/makefile @@ -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 diff --git a/reactos/apps/tests/patblt/makefile b/reactos/apps/tests/patblt/makefile index ecf5d9a45f2..347b83386c7 100644 --- a/reactos/apps/tests/patblt/makefile +++ b/reactos/apps/tests/patblt/makefile @@ -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 \ diff --git a/reactos/apps/tests/pipe/Makefile b/reactos/apps/tests/pipe/Makefile index 157a6517615..5ad8c6198ec 100644 --- a/reactos/apps/tests/pipe/Makefile +++ b/reactos/apps/tests/pipe/Makefile @@ -9,7 +9,7 @@ TARGET_APPTYPE = console TARGET_NAME = pipe -TARGET_CFLAGS = -DSTANDALONE +TARGET_CFLAGS = -DSTANDALONE -Wall -Werror TARGET_SDKLIBS = ntdll.a kernel32.a diff --git a/reactos/apps/tests/pipe/pipe.c b/reactos/apps/tests/pipe/pipe.c index 349d9cab160..3db6c6491fc 100644 --- a/reactos/apps/tests/pipe/pipe.c +++ b/reactos/apps/tests/pipe/pipe.c @@ -22,6 +22,7 @@ #include #include #include +#include #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; } diff --git a/reactos/apps/tests/primitives/Makefile b/reactos/apps/tests/primitives/Makefile index 8c985f797f5..d97c981483e 100644 --- a/reactos/apps/tests/primitives/Makefile +++ b/reactos/apps/tests/primitives/Makefile @@ -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 \ diff --git a/reactos/apps/tests/pteb/Makefile b/reactos/apps/tests/pteb/Makefile index 4b8a4df1181..bd0b363bc59 100644 --- a/reactos/apps/tests/pteb/Makefile +++ b/reactos/apps/tests/pteb/Makefile @@ -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 diff --git a/reactos/apps/tests/pteb/pteb.c b/reactos/apps/tests/pteb/pteb.c index 6e3592d0b4a..f91a2c16981 100644 --- a/reactos/apps/tests/pteb/pteb.c +++ b/reactos/apps/tests/pteb/pteb.c @@ -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); } diff --git a/reactos/apps/tests/regdump/makefile b/reactos/apps/tests/regdump/makefile index e521248cdd2..3acd56b42d5 100644 --- a/reactos/apps/tests/regdump/makefile +++ b/reactos/apps/tests/regdump/makefile @@ -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 diff --git a/reactos/apps/tests/regtest/makefile b/reactos/apps/tests/regtest/makefile index 87aa331e6dc..8da5ae0fe5a 100644 --- a/reactos/apps/tests/regtest/makefile +++ b/reactos/apps/tests/regtest/makefile @@ -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 diff --git a/reactos/apps/tests/regtest/regtest.c b/reactos/apps/tests/regtest/regtest.c index d137e5ff4fc..0996d0d2916 100644 --- a/reactos/apps/tests/regtest/regtest.c +++ b/reactos/apps/tests/regtest/regtest.c @@ -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"); diff --git a/reactos/apps/tests/sectest/Makefile b/reactos/apps/tests/sectest/Makefile index 8e00d0f8a50..93fefaecae6 100644 --- a/reactos/apps/tests/sectest/Makefile +++ b/reactos/apps/tests/sectest/Makefile @@ -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 diff --git a/reactos/apps/tests/sectest/sectest.c b/reactos/apps/tests/sectest/sectest.c index c244a92c75c..2a0a387c6da 100644 --- a/reactos/apps/tests/sectest/sectest.c +++ b/reactos/apps/tests/sectest/sectest.c @@ -1,71 +1,73 @@ -/* $Id: sectest.c,v 1.4 2002/09/08 10:22:01 chorns Exp $ */ -#define UNICODE -#define _UNICODE -#include - -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=%d)", GetLastError()); - return 1; - } - - Section = CreateFileMapping(hFile, - NULL, - PAGE_READWRITE, - 0, - 4096, - NULL); - if (Section == NULL) - { - printf("Failed to create section (err=%d)", 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 (%d)\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 (%d)\n", GetLastError()); - return 1; - } - - if (!CloseHandle(hFile)) - { - printf("Failed to close file (%d)\n", GetLastError()); - return 1; - } - - return 0; -} - +/* $Id: sectest.c,v 1.5 2003/11/14 17:13:20 weiden Exp $ */ +#define UNICODE +#define _UNICODE +#include +#include +#include + +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; +} + diff --git a/reactos/apps/tests/sertest/makefile b/reactos/apps/tests/sertest/makefile index 0e4c6a94a1a..96051f597ab 100644 --- a/reactos/apps/tests/sertest/makefile +++ b/reactos/apps/tests/sertest/makefile @@ -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 diff --git a/reactos/apps/tests/sertest/sertest.c b/reactos/apps/tests/sertest/sertest.c index 09c436de2cb..e6d7c4eae1e 100644 --- a/reactos/apps/tests/sertest/sertest.c +++ b/reactos/apps/tests/sertest/sertest.c @@ -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"); diff --git a/reactos/apps/tests/shaptest/makefile b/reactos/apps/tests/shaptest/makefile index 9c4e81f7616..6f8a915a405 100644 --- a/reactos/apps/tests/shaptest/makefile +++ b/reactos/apps/tests/shaptest/makefile @@ -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 diff --git a/reactos/apps/tests/shm/makefile b/reactos/apps/tests/shm/makefile index a069b106342..65e62f11a7d 100644 --- a/reactos/apps/tests/shm/makefile +++ b/reactos/apps/tests/shm/makefile @@ -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 diff --git a/reactos/apps/tests/statst/Makefile b/reactos/apps/tests/statst/Makefile index 2531b1c05b4..36383795569 100644 --- a/reactos/apps/tests/statst/Makefile +++ b/reactos/apps/tests/statst/Makefile @@ -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 diff --git a/reactos/apps/tests/statst2/Makefile b/reactos/apps/tests/statst2/Makefile index cdb3d0a5c95..c5a8acd106b 100644 --- a/reactos/apps/tests/statst2/Makefile +++ b/reactos/apps/tests/statst2/Makefile @@ -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 diff --git a/reactos/apps/tests/stretchblt/makefile b/reactos/apps/tests/stretchblt/makefile index 5716c75e563..2aef3b5e626 100644 --- a/reactos/apps/tests/stretchblt/makefile +++ b/reactos/apps/tests/stretchblt/makefile @@ -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 \ diff --git a/reactos/apps/tests/stretchblt/stretchblt.cpp b/reactos/apps/tests/stretchblt/stretchblt.cpp index 19694803300..ef7bed1d459 100644 --- a/reactos/apps/tests/stretchblt/stretchblt.cpp +++ b/reactos/apps/tests/stretchblt/stretchblt.cpp @@ -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)); diff --git a/reactos/apps/tests/subclass/makefile b/reactos/apps/tests/subclass/makefile index a8c3c55a2b3..00b18340a06 100644 --- a/reactos/apps/tests/subclass/makefile +++ b/reactos/apps/tests/subclass/makefile @@ -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 diff --git a/reactos/apps/tests/suspend/Makefile b/reactos/apps/tests/suspend/Makefile index ca7fbcf2bc9..29c40fd237e 100644 --- a/reactos/apps/tests/suspend/Makefile +++ b/reactos/apps/tests/suspend/Makefile @@ -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 diff --git a/reactos/apps/tests/suspend/suspend.c b/reactos/apps/tests/suspend/suspend.c index 048c771d916..15a245fdbb0 100644 --- a/reactos/apps/tests/suspend/suspend.c +++ b/reactos/apps/tests/suspend/suspend.c @@ -3,6 +3,7 @@ #define NTOS_MODE_USER #include #include +#include #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); } diff --git a/reactos/apps/tests/tcpsvr/makefile b/reactos/apps/tests/tcpsvr/makefile index 60b2cddb901..e08f9a007db 100644 --- a/reactos/apps/tests/tcpsvr/makefile +++ b/reactos/apps/tests/tcpsvr/makefile @@ -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 diff --git a/reactos/apps/tests/tcpsvr/tcpsvr.c b/reactos/apps/tests/tcpsvr/tcpsvr.c index 4d7b682112f..10eda654a8a 100644 --- a/reactos/apps/tests/tcpsvr/tcpsvr.c +++ b/reactos/apps/tests/tcpsvr/tcpsvr.c @@ -12,6 +12,8 @@ #include #include +#include +#include #undef ERROR #define SUCCESS 0 diff --git a/reactos/apps/tests/terminate/Makefile b/reactos/apps/tests/terminate/Makefile index a237952fe12..48ff88faa67 100644 --- a/reactos/apps/tests/terminate/Makefile +++ b/reactos/apps/tests/terminate/Makefile @@ -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 diff --git a/reactos/apps/tests/terminate/terminate.c b/reactos/apps/tests/terminate/terminate.c index a4cc7e49de2..b82ae6d2f5d 100644 --- a/reactos/apps/tests/terminate/terminate.c +++ b/reactos/apps/tests/terminate/terminate.c @@ -3,6 +3,7 @@ #define NTOS_MODE_USER #include #include +#include #define DBG #define NDEBUG diff --git a/reactos/apps/tests/tests/GetSysMetrics/Makefile b/reactos/apps/tests/tests/GetSysMetrics/Makefile index 942eb8010ca..2607845594d 100644 --- a/reactos/apps/tests/tests/GetSysMetrics/Makefile +++ b/reactos/apps/tests/tests/GetSysMetrics/Makefile @@ -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 diff --git a/reactos/apps/tests/tests/GetSystemInfo/Makefile b/reactos/apps/tests/tests/GetSystemInfo/Makefile index 5c0d0192296..c15d9e76f02 100644 --- a/reactos/apps/tests/tests/GetSystemInfo/Makefile +++ b/reactos/apps/tests/tests/GetSystemInfo/Makefile @@ -8,7 +8,7 @@ PROGS = GetSystemInfo OBJECTS = GetSystemInfo.o LIBS = -CFLAGS = +CFLAGS = -Wall -Werror all: $(PROGS:%=%.exe) diff --git a/reactos/apps/tests/tests/Parent_Child/Makefile b/reactos/apps/tests/tests/Parent_Child/Makefile index a84da11e761..1dbcbeb058f 100644 --- a/reactos/apps/tests/tests/Parent_Child/Makefile +++ b/reactos/apps/tests/tests/Parent_Child/Makefile @@ -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) diff --git a/reactos/apps/tests/tests/guitest/Makefile b/reactos/apps/tests/tests/guitest/Makefile index 9461982a605..7abb84cfe36 100644 --- a/reactos/apps/tests/tests/guitest/Makefile +++ b/reactos/apps/tests/tests/guitest/Makefile @@ -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) diff --git a/reactos/apps/tests/tests/hello/Makefile b/reactos/apps/tests/tests/hello/Makefile index 8052c7f4f04..12be8cd16ce 100644 --- a/reactos/apps/tests/tests/hello/Makefile +++ b/reactos/apps/tests/tests/hello/Makefile @@ -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) diff --git a/reactos/apps/tests/tests/new/Makefile b/reactos/apps/tests/tests/new/Makefile index f1efe385124..044648e96b6 100644 --- a/reactos/apps/tests/tests/new/Makefile +++ b/reactos/apps/tests/tests/new/Makefile @@ -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) diff --git a/reactos/apps/tests/tests/rolex/Makefile b/reactos/apps/tests/tests/rolex/Makefile index 7cbb5a004c7..96a9ce0f079 100644 --- a/reactos/apps/tests/tests/rolex/Makefile +++ b/reactos/apps/tests/tests/rolex/Makefile @@ -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) diff --git a/reactos/apps/tests/tests/volinfo/Makefile b/reactos/apps/tests/tests/volinfo/Makefile index 8842a1c1ead..b029c518596 100644 --- a/reactos/apps/tests/tests/volinfo/Makefile +++ b/reactos/apps/tests/tests/volinfo/Makefile @@ -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 diff --git a/reactos/apps/tests/thread/makefile b/reactos/apps/tests/thread/makefile index 7cae4731f6c..f64ad08dcc5 100644 --- a/reactos/apps/tests/thread/makefile +++ b/reactos/apps/tests/thread/makefile @@ -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 diff --git a/reactos/apps/tests/thread/thread.c b/reactos/apps/tests/thread/thread.c index e7819516c82..b7ccf56e7ca 100644 --- a/reactos/apps/tests/thread/thread.c +++ b/reactos/apps/tests/thread/thread.c @@ -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; diff --git a/reactos/apps/tests/thread_msg/makefile b/reactos/apps/tests/thread_msg/makefile index c81f127f19f..7b0a8da74f9 100644 --- a/reactos/apps/tests/thread_msg/makefile +++ b/reactos/apps/tests/thread_msg/makefile @@ -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 diff --git a/reactos/apps/tests/thread_msg/thread_msg.c b/reactos/apps/tests/thread_msg/thread_msg.c index f62d05f12ec..dc8359b4f94 100644 --- a/reactos/apps/tests/thread_msg/thread_msg.c +++ b/reactos/apps/tests/thread_msg/thread_msg.c @@ -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" ); diff --git a/reactos/apps/tests/threadwait/makefile b/reactos/apps/tests/threadwait/makefile index 398ba467e4a..5180a84d3ed 100644 --- a/reactos/apps/tests/threadwait/makefile +++ b/reactos/apps/tests/threadwait/makefile @@ -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 diff --git a/reactos/apps/tests/threadwait/threadwait.c b/reactos/apps/tests/threadwait/threadwait.c index 2039119f245..683bcc0d04f 100644 --- a/reactos/apps/tests/threadwait/threadwait.c +++ b/reactos/apps/tests/threadwait/threadwait.c @@ -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"); diff --git a/reactos/apps/tests/tokentest/makefile b/reactos/apps/tests/tokentest/makefile index c7050d0074d..97c219b8884 100644 --- a/reactos/apps/tests/tokentest/makefile +++ b/reactos/apps/tests/tokentest/makefile @@ -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 diff --git a/reactos/apps/tests/tokentest/tokentest.c b/reactos/apps/tests/tokentest/tokentest.c index e0bbdbcb2b0..6578f522d72 100644 --- a/reactos/apps/tests/tokentest/tokentest.c +++ b/reactos/apps/tests/tokentest/tokentest.c @@ -3,6 +3,7 @@ #define ANONYMOUSUNIONS #include +#include #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; diff --git a/reactos/apps/tests/txtscale/Makefile b/reactos/apps/tests/txtscale/Makefile index 16a3359fea4..3447a962ee1 100644 --- a/reactos/apps/tests/txtscale/Makefile +++ b/reactos/apps/tests/txtscale/Makefile @@ -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 \ diff --git a/reactos/apps/tests/vmtest/Makefile b/reactos/apps/tests/vmtest/Makefile index 4711259d0e9..bf2951385ad 100644 --- a/reactos/apps/tests/vmtest/Makefile +++ b/reactos/apps/tests/vmtest/Makefile @@ -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 diff --git a/reactos/apps/tests/vmtest/vmtest.c b/reactos/apps/tests/vmtest/vmtest.c index d68ebbb34e2..ec7235ce06d 100644 --- a/reactos/apps/tests/vmtest/vmtest.c +++ b/reactos/apps/tests/vmtest/vmtest.c @@ -50,5 +50,6 @@ int main() { printf("VirtualAlloc failed 5\n"); } + return 0; } diff --git a/reactos/apps/tests/winhello/makefile b/reactos/apps/tests/winhello/makefile index 9a67e5352bd..f2dec186bc2 100644 --- a/reactos/apps/tests/winhello/makefile +++ b/reactos/apps/tests/winhello/makefile @@ -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 diff --git a/reactos/apps/tests/winhello/winhello.c b/reactos/apps/tests/winhello/winhello.c index cbde33d2764..89da4185918 100644 --- a/reactos/apps/tests/winhello/winhello.c +++ b/reactos/apps/tests/winhello/winhello.c @@ -1,5 +1,6 @@ #include #include +#include //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 ); diff --git a/reactos/apps/tests/winhello2/makefile b/reactos/apps/tests/winhello2/makefile index 3833189aecd..235dbad873a 100644 --- a/reactos/apps/tests/winhello2/makefile +++ b/reactos/apps/tests/winhello2/makefile @@ -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 diff --git a/reactos/apps/tests/winhello2/winhello2.c b/reactos/apps/tests/winhello2/winhello2.c index 54576987d89..eac5eaaeb5f 100644 --- a/reactos/apps/tests/winhello2/winhello2.c +++ b/reactos/apps/tests/winhello2/winhello2.c @@ -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 ); diff --git a/reactos/apps/tests/wm_erasebkgnd/makefile b/reactos/apps/tests/wm_erasebkgnd/makefile index 50c09860ec5..866a14a95e0 100644 --- a/reactos/apps/tests/wm_erasebkgnd/makefile +++ b/reactos/apps/tests/wm_erasebkgnd/makefile @@ -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 \ diff --git a/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp b/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp index 582673f06bf..6bfa5a37749 100644 --- a/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp +++ b/reactos/apps/tests/wm_erasebkgnd/wm_erasebkgnd.cpp @@ -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)); diff --git a/reactos/apps/tests/wm_paint/makefile b/reactos/apps/tests/wm_paint/makefile index 9fccf77a108..371c23e8965 100644 --- a/reactos/apps/tests/wm_paint/makefile +++ b/reactos/apps/tests/wm_paint/makefile @@ -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 diff --git a/reactos/apps/tests/wm_paint/wm_paint.c b/reactos/apps/tests/wm_paint/wm_paint.c index 8d9174add9c..7da173e9208 100644 --- a/reactos/apps/tests/wm_paint/wm_paint.c +++ b/reactos/apps/tests/wm_paint/wm_paint.c @@ -13,6 +13,7 @@ //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #include +#include //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< diff --git a/reactos/apps/testsets/loadlib/loadlib.c b/reactos/apps/testsets/loadlib/loadlib.c index fd767c0b13e..87517ed591d 100644 --- a/reactos/apps/testsets/loadlib/loadlib.c +++ b/reactos/apps/testsets/loadlib/loadlib.c @@ -22,7 +22,8 @@ #include #include "loadlib.h" - +#include +#include #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; diff --git a/reactos/apps/testsets/loadlib/makefile b/reactos/apps/testsets/loadlib/makefile index a10e2440ca8..77a87187d43 100644 --- a/reactos/apps/testsets/loadlib/makefile +++ b/reactos/apps/testsets/loadlib/makefile @@ -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 diff --git a/reactos/apps/utils/cat/makefile b/reactos/apps/utils/cat/makefile index 4b230bd8323..8dfa2e9c5ff 100644 --- a/reactos/apps/utils/cat/makefile +++ b/reactos/apps/utils/cat/makefile @@ -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 diff --git a/reactos/apps/utils/consw/consw.c b/reactos/apps/utils/consw/consw.c index 2b8308fb818..e33e105cb43 100644 --- a/reactos/apps/utils/consw/consw.c +++ b/reactos/apps/utils/consw/consw.c @@ -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; } diff --git a/reactos/apps/utils/consw/makefile b/reactos/apps/utils/consw/makefile index 7e6192e4722..18ab10e416e 100644 --- a/reactos/apps/utils/consw/makefile +++ b/reactos/apps/utils/consw/makefile @@ -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 diff --git a/reactos/apps/utils/partinfo/makefile b/reactos/apps/utils/partinfo/makefile index cc45b699fbf..1500995d44a 100644 --- a/reactos/apps/utils/partinfo/makefile +++ b/reactos/apps/utils/partinfo/makefile @@ -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 diff --git a/reactos/apps/utils/sc/makefile b/reactos/apps/utils/sc/makefile index 4cadccf3579..d1ecd488bf3 100644 --- a/reactos/apps/utils/sc/makefile +++ b/reactos/apps/utils/sc/makefile @@ -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 diff --git a/reactos/apps/utils/stats/Makefile b/reactos/apps/utils/stats/Makefile index 525d0559af1..fb0ec6d92cf 100644 --- a/reactos/apps/utils/stats/Makefile +++ b/reactos/apps/utils/stats/Makefile @@ -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 diff --git a/reactos/apps/utils/stats/stats.c b/reactos/apps/utils/stats/stats.c index e60af40d45f..3f058650824 100644 --- a/reactos/apps/utils/stats/stats.c +++ b/reactos/apps/utils/stats/stats.c @@ -9,7 +9,7 @@ */ #include #include - +#include 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); } diff --git a/reactos/apps/utils/tickcount/makefile b/reactos/apps/utils/tickcount/makefile index 96791815a9d..9e8a3e042fb 100644 --- a/reactos/apps/utils/tickcount/makefile +++ b/reactos/apps/utils/tickcount/makefile @@ -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 diff --git a/reactos/drivers/bus/acpi/events/evxfregn.c b/reactos/drivers/bus/acpi/events/evxfregn.c index c7e37384764..a675b09a374 100644 --- a/reactos/drivers/bus/acpi/events/evxfregn.c +++ b/reactos/drivers/bus/acpi/events/evxfregn.c @@ -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); } diff --git a/reactos/drivers/bus/acpi/ospm/acpienum.c b/reactos/drivers/bus/acpi/ospm/acpienum.c index 6ff85574561..258b805203c 100644 --- a/reactos/drivers/bus/acpi/ospm/acpienum.c +++ b/reactos/drivers/bus/acpi/ospm/acpienum.c @@ -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; diff --git a/reactos/drivers/bus/acpi/ospm/fdo.c b/reactos/drivers/bus/acpi/ospm/fdo.c index 6fc59852190..f4afcb28cc1 100644 --- a/reactos/drivers/bus/acpi/ospm/fdo.c +++ b/reactos/drivers/bus/acpi/ospm/fdo.c @@ -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); diff --git a/reactos/drivers/bus/acpi/ospm/osl.c b/reactos/drivers/bus/acpi/ospm/osl.c index bae1851a230..843f819873e 100644 --- a/reactos/drivers/bus/acpi/ospm/osl.c +++ b/reactos/drivers/bus/acpi/ospm/osl.c @@ -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)) { diff --git a/reactos/drivers/bus/acpi/ospm/pdo.c b/reactos/drivers/bus/acpi/ospm/pdo.c index f7d17c578f4..cc14bdecca6 100644 --- a/reactos/drivers/bus/acpi/ospm/pdo.c +++ b/reactos/drivers/bus/acpi/ospm/pdo.c @@ -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"); diff --git a/reactos/drivers/bus/isapnp/isapnp.c b/reactos/drivers/bus/isapnp/isapnp.c index 594ca3c4fe4..32847348898 100644 --- a/reactos/drivers/bus/isapnp/isapnp.c +++ b/reactos/drivers/bus/isapnp/isapnp.c @@ -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"); diff --git a/reactos/drivers/bus/isapnp/makefile b/reactos/drivers/bus/isapnp/makefile index 656d4a30ae0..8fc5c74d25f 100644 --- a/reactos/drivers/bus/isapnp/makefile +++ b/reactos/drivers/bus/isapnp/makefile @@ -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 diff --git a/reactos/drivers/bus/pci/makefile b/reactos/drivers/bus/pci/makefile index eb1ccc37d6c..2a7d1a5e659 100644 --- a/reactos/drivers/bus/pci/makefile +++ b/reactos/drivers/bus/pci/makefile @@ -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 diff --git a/reactos/drivers/bus/pci/pci.c b/reactos/drivers/bus/pci/pci.c index a246e1b69e8..8918fe6dd57 100644 --- a/reactos/drivers/bus/pci/pci.c +++ b/reactos/drivers/bus/pci/pci.c @@ -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; } diff --git a/reactos/drivers/bus/pci/pci.h b/reactos/drivers/bus/pci/pci.h index f34012d0b66..e8d5b36083e 100644 --- a/reactos/drivers/bus/pci/pci.h +++ b/reactos/drivers/bus/pci/pci.h @@ -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, diff --git a/reactos/drivers/dd/bootvid/Makefile b/reactos/drivers/dd/bootvid/Makefile index cbe61da0f6d..153d04509fe 100644 --- a/reactos/drivers/dd/bootvid/Makefile +++ b/reactos/drivers/dd/bootvid/Makefile @@ -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 diff --git a/reactos/drivers/dd/bootvid/bootvid.c b/reactos/drivers/dd/bootvid/bootvid.c index f0d392cd5a1..8e4afc0005b 100644 --- a/reactos/drivers/dd/bootvid/bootvid.c +++ b/reactos/drivers/dd/bootvid/bootvid.c @@ -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; diff --git a/reactos/drivers/dd/debugout/makefile b/reactos/drivers/dd/debugout/makefile index c76a8e0405b..ba0b0241dac 100644 --- a/reactos/drivers/dd/debugout/makefile +++ b/reactos/drivers/dd/debugout/makefile @@ -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 diff --git a/reactos/drivers/dd/ide/makefile b/reactos/drivers/dd/ide/makefile index a50a63ab3ec..ea15dd78c9f 100644 --- a/reactos/drivers/dd/ide/makefile +++ b/reactos/drivers/dd/ide/makefile @@ -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 diff --git a/reactos/drivers/dd/serial/makefile b/reactos/drivers/dd/serial/makefile index 8d99ee856af..86d09fe65d1 100644 --- a/reactos/drivers/dd/serial/makefile +++ b/reactos/drivers/dd/serial/makefile @@ -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 diff --git a/reactos/drivers/dd/serial/serial.c b/reactos/drivers/dd/serial/serial.c index 7bd03e9434d..f1395ef5a15 100644 --- a/reactos/drivers/dd/serial/serial.c +++ b/reactos/drivers/dd/serial/serial.c @@ -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; diff --git a/reactos/drivers/dd/vga/display/main/enable.c b/reactos/drivers/dd/vga/display/main/enable.c index 34b2f9ffb1d..fd5f8e86071 100644 --- a/reactos/drivers/dd/vga/display/main/enable.c +++ b/reactos/drivers/dd/vga/display/main/enable.c @@ -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 */ diff --git a/reactos/drivers/dd/vga/display/makefile b/reactos/drivers/dd/vga/display/makefile index 825e72e76ae..835237d8eb8 100644 --- a/reactos/drivers/dd/vga/display/makefile +++ b/reactos/drivers/dd/vga/display/makefile @@ -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 diff --git a/reactos/drivers/dd/vga/display/objects/bitblt.c b/reactos/drivers/dd/vga/display/objects/bitblt.c index 15bcb5496d4..0fd8ee28d99 100644 --- a/reactos/drivers/dd/vga/display/objects/bitblt.c +++ b/reactos/drivers/dd/vga/display/objects/bitblt.c @@ -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 diff --git a/reactos/drivers/dd/vga/display/objects/lineto.c b/reactos/drivers/dd/vga/display/objects/lineto.c index 7778a651de9..3319a4667a8 100644 --- a/reactos/drivers/dd/vga/display/objects/lineto.c +++ b/reactos/drivers/dd/vga/display/objects/lineto.c @@ -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; diff --git a/reactos/drivers/dd/vga/display/objects/paint.c b/reactos/drivers/dd/vga/display/objects/paint.c index 16e36d35d7d..a4133f7123e 100644 --- a/reactos/drivers/dd/vga/display/objects/paint.c +++ b/reactos/drivers/dd/vga/display/objects/paint.c @@ -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); diff --git a/reactos/drivers/dd/vga/display/objects/pointer.c b/reactos/drivers/dd/vga/display/objects/pointer.c index 63749092db2..c75bb9313f3 100644 --- a/reactos/drivers/dd/vga/display/objects/pointer.c +++ b/reactos/drivers/dd/vga/display/objects/pointer.c @@ -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; diff --git a/reactos/drivers/dd/vga/display/objects/screen.c b/reactos/drivers/dd/vga/display/objects/screen.c index db6a70297f0..7008ee162c0 100644 --- a/reactos/drivers/dd/vga/display/objects/screen.c +++ b/reactos/drivers/dd/vga/display/objects/screen.c @@ -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; diff --git a/reactos/drivers/dd/vga/display/vgaddi.h b/reactos/drivers/dd/vga/display/vgaddi.h index b89d9e40717..4610d35358a 100644 --- a/reactos/drivers/dd/vga/display/vgaddi.h +++ b/reactos/drivers/dd/vga/display/vgaddi.h @@ -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 ); diff --git a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.c b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.c index 5af41d05b72..e2a73167fb9 100644 --- a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.c +++ b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.c @@ -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) diff --git a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h index 77be5ab1457..7ecc0900832 100644 --- a/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h +++ b/reactos/drivers/dd/vga/display/vgavideo/vgavideo.h @@ -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); diff --git a/reactos/drivers/dd/vga/miniport/initvga.c b/reactos/drivers/dd/vga/miniport/initvga.c index d2a4ead43aa..2939d733291 100644 --- a/reactos/drivers/dd/vga/miniport/initvga.c +++ b/reactos/drivers/dd/vga/miniport/initvga.c @@ -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"); diff --git a/reactos/drivers/dd/vga/miniport/makefile b/reactos/drivers/dd/vga/miniport/makefile index e87b801f0a1..f532b627807 100644 --- a/reactos/drivers/dd/vga/miniport/makefile +++ b/reactos/drivers/dd/vga/miniport/makefile @@ -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 \ diff --git a/reactos/drivers/dd/vga/miniport/vgamp.c b/reactos/drivers/dd/vga/miniport/vgamp.c index f89dec15863..8dd9cd116c0 100644 --- a/reactos/drivers/dd/vga/miniport/vgamp.c +++ b/reactos/drivers/dd/vga/miniport/vgamp.c @@ -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, diff --git a/reactos/drivers/input/keyboard/keyboard.c b/reactos/drivers/input/keyboard/keyboard.c index 7f51741b096..6ca456af51e 100644 --- a/reactos/drivers/input/keyboard/keyboard.c +++ b/reactos/drivers/input/keyboard/keyboard.c @@ -546,7 +546,6 @@ KeyboardHandler(PKINTERRUPT Interrupt, { KEY_EVENT_RECORD* rec = (KEY_EVENT_RECORD *) CurrentIrp->AssociatedIrp.SystemBuffer; - PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(CurrentIrp); CHECKPOINT; diff --git a/reactos/drivers/input/keyboard/makefile b/reactos/drivers/input/keyboard/makefile index f628726e210..a241be9a2a5 100644 --- a/reactos/drivers/input/keyboard/makefile +++ b/reactos/drivers/input/keyboard/makefile @@ -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 diff --git a/reactos/drivers/input/mouclass/makefile b/reactos/drivers/input/mouclass/makefile index ff7302a371d..4440edfb92a 100644 --- a/reactos/drivers/input/mouclass/makefile +++ b/reactos/drivers/input/mouclass/makefile @@ -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 diff --git a/reactos/drivers/input/mouclass/mouclass.c b/reactos/drivers/input/mouclass/mouclass.c index 5ac3ed2b87a..5bc2f508ff3 100644 --- a/reactos/drivers/input/mouclass/mouclass.c +++ b/reactos/drivers/input/mouclass/mouclass.c @@ -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. diff --git a/reactos/drivers/input/psaux/controller.c b/reactos/drivers/input/psaux/controller.c index 408650e356a..ecec69d6327 100644 --- a/reactos/drivers/input/psaux/controller.c +++ b/reactos/drivers/input/psaux/controller.c @@ -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(); diff --git a/reactos/drivers/input/psaux/controller.h b/reactos/drivers/input/psaux/controller.h index 7269b25105e..055cade8d5c 100644 --- a/reactos/drivers/input/psaux/controller.h +++ b/reactos/drivers/input/psaux/controller.h @@ -137,3 +137,4 @@ #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); diff --git a/reactos/drivers/input/psaux/logips2pp.c b/reactos/drivers/input/psaux/logips2pp.c index 448c8ef4bad..148126654b3 100644 --- a/reactos/drivers/input/psaux/logips2pp.c +++ b/reactos/drivers/input/psaux/logips2pp.c @@ -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 }; diff --git a/reactos/drivers/input/psaux/makefile b/reactos/drivers/input/psaux/makefile index ce6a103f827..8f1a3ebbd34 100644 --- a/reactos/drivers/input/psaux/makefile +++ b/reactos/drivers/input/psaux/makefile @@ -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 diff --git a/reactos/drivers/input/psaux/mouse.c b/reactos/drivers/input/psaux/mouse.c index a01658f1824..78031a038bf 100644 --- a/reactos/drivers/input/psaux/mouse.c +++ b/reactos/drivers/input/psaux/mouse.c @@ -13,6 +13,11 @@ #include +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; diff --git a/reactos/drivers/input/psaux/mouse.h b/reactos/drivers/input/psaux/mouse.h index 192a452c0b1..4d0e720b433 100644 --- a/reactos/drivers/input/psaux/mouse.h +++ b/reactos/drivers/input/psaux/mouse.h @@ -54,13 +54,6 @@ #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); diff --git a/reactos/drivers/input/psaux/psaux.c b/reactos/drivers/input/psaux/psaux.c index e26b29eda83..4327b7ca96c 100644 --- a/reactos/drivers/input/psaux/psaux.c +++ b/reactos/drivers/input/psaux/psaux.c @@ -13,14 +13,17 @@ #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"); diff --git a/reactos/drivers/input/sermouse/makefile b/reactos/drivers/input/sermouse/makefile index 22657b631bc..9881ce6577b 100644 --- a/reactos/drivers/input/sermouse/makefile +++ b/reactos/drivers/input/sermouse/makefile @@ -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 diff --git a/reactos/drivers/lib/bzip2/Makefile b/reactos/drivers/lib/bzip2/Makefile index f9c85b8ed3a..2e498333328 100644 --- a/reactos/drivers/lib/bzip2/Makefile +++ b/reactos/drivers/lib/bzip2/Makefile @@ -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 \ diff --git a/reactos/drivers/net/afd/afd/dispatch.c b/reactos/drivers/net/afd/afd/dispatch.c index 40b9c875ea1..7aac87e48ff 100644 --- a/reactos/drivers/net/afd/afd/dispatch.c +++ b/reactos/drivers/net/afd/afd/dispatch.c @@ -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")); diff --git a/reactos/drivers/net/afd/afd/event.c b/reactos/drivers/net/afd/afd/event.c index 729ea2226b5..216c86f261f 100644 --- a/reactos/drivers/net/afd/afd/event.c +++ b/reactos/drivers/net/afd/afd/event.c @@ -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; diff --git a/reactos/drivers/net/afd/afd/opnclose.c b/reactos/drivers/net/afd/afd/opnclose.c index 45a11e511ed..a7ac4ffc4e1 100644 --- a/reactos/drivers/net/afd/afd/opnclose.c +++ b/reactos/drivers/net/afd/afd/opnclose.c @@ -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; diff --git a/reactos/drivers/net/afd/afd/rdwr.c b/reactos/drivers/net/afd/afd/rdwr.c index ce2818078a1..1cf2d7db113 100644 --- a/reactos/drivers/net/afd/afd/rdwr.c +++ b/reactos/drivers/net/afd/afd/rdwr.c @@ -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; diff --git a/reactos/drivers/net/afd/afd/routines.c b/reactos/drivers/net/afd/afd/routines.c index 29473046aa9..22f501b138b 100644 --- a/reactos/drivers/net/afd/afd/routines.c +++ b/reactos/drivers/net/afd/afd/routines.c @@ -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) diff --git a/reactos/drivers/net/afd/afd/tdi.c b/reactos/drivers/net/afd/afd/tdi.c index a97a278c56e..bbb238c68ea 100644 --- a/reactos/drivers/net/afd/afd/tdi.c +++ b/reactos/drivers/net/afd/afd/tdi.c @@ -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; diff --git a/reactos/drivers/net/afd/makefile b/reactos/drivers/net/afd/makefile index 19db7c81451..6ff2a6de576 100644 --- a/reactos/drivers/net/afd/makefile +++ b/reactos/drivers/net/afd/makefile @@ -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 \ diff --git a/reactos/drivers/net/dd/ne2000/Makefile b/reactos/drivers/net/dd/ne2000/Makefile index e94d6050e26..5e5ff7305d9 100644 --- a/reactos/drivers/net/dd/ne2000/Makefile +++ b/reactos/drivers/net/dd/ne2000/Makefile @@ -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 \ diff --git a/reactos/drivers/net/ndis/Makefile b/reactos/drivers/net/ndis/Makefile index e77496d58e4..3829cfdcdf9 100644 --- a/reactos/drivers/net/ndis/Makefile +++ b/reactos/drivers/net/ndis/Makefile @@ -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 \ diff --git a/reactos/drivers/net/npf/Makefile b/reactos/drivers/net/npf/Makefile index e09b4f2f6c3..42d8e05d5f1 100644 --- a/reactos/drivers/net/npf/Makefile +++ b/reactos/drivers/net/npf/Makefile @@ -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 diff --git a/reactos/drivers/net/npf/dump.c b/reactos/drivers/net/npf/dump.c index a567c831149..afef4f5da3e 100644 --- a/reactos/drivers/net/npf/dump.c +++ b/reactos/drivers/net/npf/dump.c @@ -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); diff --git a/reactos/drivers/net/npf/jitter.h b/reactos/drivers/net/npf/jitter.h index de4e609ea82..0acbd0ab5f3 100644 --- a/reactos/drivers/net/npf/jitter.h +++ b/reactos/drivers/net/npf/jitter.h @@ -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) \ diff --git a/reactos/drivers/net/npf/openclos.c b/reactos/drivers/net/npf/openclos.c index bdb5b1a75c7..fbf2edf1df6 100644 --- a/reactos/drivers/net/npf/openclos.c +++ b/reactos/drivers/net/npf/openclos.c @@ -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");) diff --git a/reactos/drivers/net/npf/packet.c b/reactos/drivers/net/npf/packet.c index 815ae7185fe..4ccc3189f45 100644 --- a/reactos/drivers/net/npf/packet.c +++ b/reactos/drivers/net/npf/packet.c @@ -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; diff --git a/reactos/drivers/net/npf/read.c b/reactos/drivers/net/npf/read.c index 75417440b0f..093146f7991 100644 --- a/reactos/drivers/net/npf/read.c +++ b/reactos/drivers/net/npf/read.c @@ -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; diff --git a/reactos/drivers/net/npf/tcp_session.c b/reactos/drivers/net/npf/tcp_session.c index 37420644143..1123a65abce 100644 --- a/reactos/drivers/net/npf/tcp_session.c +++ b/reactos/drivers/net/npf/tcp_session.c @@ -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_clnack_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; diff --git a/reactos/drivers/net/npf/time_calls.c b/reactos/drivers/net/npf/time_calls.c index 0e426970f0a..2152a460013 100644 --- a/reactos/drivers/net/npf/time_calls.c +++ b/reactos/drivers/net/npf/time_calls.c @@ -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; diff --git a/reactos/drivers/net/npf/write.c b/reactos/drivers/net/npf/write.c index c3c5eb578c0..291474d7667 100644 --- a/reactos/drivers/net/npf/write.c +++ b/reactos/drivers/net/npf/write.c @@ -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);) diff --git a/reactos/drivers/net/tdi/Makefile b/reactos/drivers/net/tdi/Makefile index d43692b6a11..b204812d406 100644 --- a/reactos/drivers/net/tdi/Makefile +++ b/reactos/drivers/net/tdi/Makefile @@ -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 = \ diff --git a/reactos/drivers/net/tdi/tdi/dereg.c b/reactos/drivers/net/tdi/tdi/dereg.c index a1601ad1abb..84be2277489 100644 --- a/reactos/drivers/net/tdi/tdi/dereg.c +++ b/reactos/drivers/net/tdi/tdi/dereg.c @@ -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 @@ -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 diff --git a/reactos/drivers/net/wshtcpip/makefile b/reactos/drivers/net/wshtcpip/makefile index 50ce2a75b25..b4b6fc6d4f6 100644 --- a/reactos/drivers/net/wshtcpip/makefile +++ b/reactos/drivers/net/wshtcpip/makefile @@ -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 diff --git a/reactos/hal/hal/Makefile b/reactos/hal/hal/Makefile index 94d60cf0b70..35a1001a853 100644 --- a/reactos/hal/hal/Makefile +++ b/reactos/hal/hal/Makefile @@ -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 diff --git a/reactos/iface/addsys/makefile b/reactos/iface/addsys/makefile index 9c28f85e1f6..1d2a5fdcd99 100644 --- a/reactos/iface/addsys/makefile +++ b/reactos/iface/addsys/makefile @@ -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 diff --git a/reactos/iface/native/makefile b/reactos/iface/native/makefile index ad281f7c257..b5f81878065 100644 --- a/reactos/iface/native/makefile +++ b/reactos/iface/native/makefile @@ -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) diff --git a/reactos/include/msvcrt/wchar.h b/reactos/include/msvcrt/wchar.h index d3afbd962e6..98b3acc891b 100644 --- a/reactos/include/msvcrt/wchar.h +++ b/reactos/include/msvcrt/wchar.h @@ -18,15 +18,17 @@ * 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 #include diff --git a/reactos/lib/crtdll/except/abnorter.c b/reactos/lib/crtdll/except/abnorter.c index 996aa4230c3..b480e72df1b 100644 --- a/reactos/lib/crtdll/except/abnorter.c +++ b/reactos/lib/crtdll/except/abnorter.c @@ -1,5 +1,5 @@ #include - +#include #ifdef __GNUC__ @@ -10,6 +10,7 @@ int _abnormal_termination(void) { printf("Abnormal Termination\n"); // return AbnormalTermination(); + return 0; } #else diff --git a/reactos/lib/crtdll/makefile b/reactos/lib/crtdll/makefile index a2b108353a5..c1dd314e959 100644 --- a/reactos/lib/crtdll/makefile +++ b/reactos/lib/crtdll/makefile @@ -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 diff --git a/reactos/lib/crtdll/process/spawnve.c b/reactos/lib/crtdll/process/spawnve.c index cc52fba2652..b7dc04b8fdb 100644 --- a/reactos/lib/crtdll/process/spawnve.c +++ b/reactos/lib/crtdll/process/spawnve.c @@ -10,6 +10,7 @@ #include #include #include +#include #ifndef F_OK diff --git a/reactos/lib/crtdll/signal/xcptfil.c b/reactos/lib/crtdll/signal/xcptfil.c index e65a7e78056..aaff4a9f229 100644 --- a/reactos/lib/crtdll/signal/xcptfil.c +++ b/reactos/lib/crtdll/signal/xcptfil.c @@ -11,4 +11,5 @@ int _XcptFilter ( { //fixme XcptFilter // return UnhandledExceptionFilter(ExceptionInfo); + return 0; } diff --git a/reactos/lib/crtdll/sys_stat/stat.c b/reactos/lib/crtdll/sys_stat/stat.c index 278f842045a..fe46c21f328 100644 --- a/reactos/lib/crtdll/sys_stat/stat.c +++ b/reactos/lib/crtdll/sys_stat/stat.c @@ -4,7 +4,7 @@ #include #include #include - +#include /* * @implemented diff --git a/reactos/lib/crtdll/sys_stat/systime.c b/reactos/lib/crtdll/sys_stat/systime.c index 1cee69f1b3f..1eec193001f 100644 --- a/reactos/lib/crtdll/sys_stat/systime.c +++ b/reactos/lib/crtdll/sys_stat/systime.c @@ -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); diff --git a/reactos/lib/d3d8thk/Makefile b/reactos/lib/d3d8thk/Makefile index 02b9f05da35..13a02f8379f 100644 --- a/reactos/lib/d3d8thk/Makefile +++ b/reactos/lib/d3d8thk/Makefile @@ -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 diff --git a/reactos/lib/iphlpapi/iphlpapi.c b/reactos/lib/iphlpapi/iphlpapi.c index 114259bbfe2..3e22a93cdcd 100644 --- a/reactos/lib/iphlpapi/iphlpapi.c +++ b/reactos/lib/iphlpapi/iphlpapi.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -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++; } } diff --git a/reactos/lib/iphlpapi/makefile b/reactos/lib/iphlpapi/makefile index d1ef62ef5cd..d7d38082e6a 100644 --- a/reactos/lib/iphlpapi/makefile +++ b/reactos/lib/iphlpapi/makefile @@ -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 diff --git a/reactos/lib/msimg32/Makefile b/reactos/lib/msimg32/Makefile index 979a2f5b2df..c7f4b9d093e 100644 --- a/reactos/lib/msimg32/Makefile +++ b/reactos/lib/msimg32/Makefile @@ -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 diff --git a/reactos/lib/msvcrt/Makefile b/reactos/lib/msvcrt/Makefile index e3f8aabcf96..d30dfd5d2c5 100644 --- a/reactos/lib/msvcrt/Makefile +++ b/reactos/lib/msvcrt/Makefile @@ -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 diff --git a/reactos/lib/msvcrt/except/abnorter.c b/reactos/lib/msvcrt/except/abnorter.c index 996aa4230c3..515d780eca5 100644 --- a/reactos/lib/msvcrt/except/abnorter.c +++ b/reactos/lib/msvcrt/except/abnorter.c @@ -1,5 +1,5 @@ #include - +#include #ifdef __GNUC__ @@ -10,6 +10,7 @@ int _abnormal_termination(void) { printf("Abnormal Termination\n"); // return AbnormalTermination(); + return 0; } #else diff --git a/reactos/lib/msvcrt/except/unwind.c b/reactos/lib/msvcrt/except/unwind.c index 3cebce48489..5c255f5c246 100644 --- a/reactos/lib/msvcrt/except/unwind.c +++ b/reactos/lib/msvcrt/except/unwind.c @@ -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); diff --git a/reactos/lib/msvcrt/except/xcptfil.c b/reactos/lib/msvcrt/except/xcptfil.c index c01b91a024d..41bf69b8ddb 100644 --- a/reactos/lib/msvcrt/except/xcptfil.c +++ b/reactos/lib/msvcrt/except/xcptfil.c @@ -10,5 +10,6 @@ _XcptFilter(DWORD ExceptionCode, { //fixme XcptFilter // return UnhandledExceptionFilter(ExceptionInfo); + return 0; } diff --git a/reactos/lib/msvcrt/io/write.c b/reactos/lib/msvcrt/io/write.c index 7f232e807ad..01d2d091027 100644 --- a/reactos/lib/msvcrt/io/write.c +++ b/reactos/lib/msvcrt/io/write.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #define NDEBUG diff --git a/reactos/lib/msvcrt/mbstring/mbsrev.c b/reactos/lib/msvcrt/mbstring/mbsrev.c index 6179c2d936f..f30cb10cd04 100644 --- a/reactos/lib/msvcrt/mbstring/mbsrev.c +++ b/reactos/lib/msvcrt/mbstring/mbsrev.c @@ -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; diff --git a/reactos/lib/msvcrt/misc/cpp.c b/reactos/lib/msvcrt/misc/cpp.c index 61cec9ee1b2..a0e3af1128c 100644 --- a/reactos/lib/msvcrt/misc/cpp.c +++ b/reactos/lib/msvcrt/misc/cpp.c @@ -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 #include #include +#include +#include #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 ) { diff --git a/reactos/lib/msvcrt/misc/environ.c b/reactos/lib/msvcrt/misc/environ.c index edc0c318f1f..ddf46d1c785 100644 --- a/reactos/lib/msvcrt/misc/environ.c +++ b/reactos/lib/msvcrt/misc/environ.c @@ -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 #include #include +#include #define NDEBUG #include diff --git a/reactos/lib/msvcrt/misc/initterm.c b/reactos/lib/msvcrt/misc/initterm.c index 9d5c7d5664c..335729cc802 100644 --- a/reactos/lib/msvcrt/misc/initterm.c +++ b/reactos/lib/msvcrt/misc/initterm.c @@ -27,6 +27,7 @@ typedef int (* _onexit_t)(void); */ _onexit_t __dllonexit(_onexit_t func, void (** fStart[])(void), void (** fEnd[])(void)) { + return 0; } /* diff --git a/reactos/lib/msvcrt/process/thread.c b/reactos/lib/msvcrt/process/thread.c index f23aaefed66..6add622c104 100644 --- a/reactos/lib/msvcrt/process/thread.c +++ b/reactos/lib/msvcrt/process/thread.c @@ -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 #include #include +#include /* diff --git a/reactos/lib/msvcrt/process/threadx.c b/reactos/lib/msvcrt/process/threadx.c index 01b3bc2f085..35671e6459f 100644 --- a/reactos/lib/msvcrt/process/threadx.c +++ b/reactos/lib/msvcrt/process/threadx.c @@ -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 #include #include +#include /* diff --git a/reactos/lib/msvcrt/stdio/vfprintf.c b/reactos/lib/msvcrt/stdio/vfprintf.c index 35656b3bbee..0c8855c7deb 100644 --- a/reactos/lib/msvcrt/stdio/vfprintf.c +++ b/reactos/lib/msvcrt/stdio/vfprintf.c @@ -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; diff --git a/reactos/lib/msvcrt/stdio/vfwprint.c b/reactos/lib/msvcrt/stdio/vfwprint.c index 6f691d2c176..545ec63d37c 100644 --- a/reactos/lib/msvcrt/stdio/vfwprint.c +++ b/reactos/lib/msvcrt/stdio/vfwprint.c @@ -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; diff --git a/reactos/lib/msvcrt/stdlib/mbstowcs.c b/reactos/lib/msvcrt/stdlib/mbstowcs.c index d566d736614..f50cfb964e8 100644 --- a/reactos/lib/msvcrt/stdlib/mbstowcs.c +++ b/reactos/lib/msvcrt/stdlib/mbstowcs.c @@ -1,5 +1,7 @@ #include #include +#include +#include #if 1 /* diff --git a/reactos/lib/msvcrt/stdlib/strtol.c b/reactos/lib/msvcrt/stdlib/strtol.c index 0ae10c9b6e3..40262d5e819 100644 --- a/reactos/lib/msvcrt/stdlib/strtol.c +++ b/reactos/lib/msvcrt/stdlib/strtol.c @@ -3,6 +3,7 @@ #include #include #include +#include /* diff --git a/reactos/lib/msvcrt/stdlib/strtoul.c b/reactos/lib/msvcrt/stdlib/strtoul.c index 63ee96adcc1..59fbe38b3f3 100644 --- a/reactos/lib/msvcrt/stdlib/strtoul.c +++ b/reactos/lib/msvcrt/stdlib/strtoul.c @@ -3,6 +3,7 @@ #include #include #include +#include /* * Convert a string to an unsigned long integer. diff --git a/reactos/lib/msvcrt/stdlib/wcstol.c b/reactos/lib/msvcrt/stdlib/wcstol.c index 41e4b17673f..3f601e19131 100644 --- a/reactos/lib/msvcrt/stdlib/wcstol.c +++ b/reactos/lib/msvcrt/stdlib/wcstol.c @@ -1,4 +1,5 @@ #include +#include /* diff --git a/reactos/lib/msvcrt/stdlib/wcstomb.c b/reactos/lib/msvcrt/stdlib/wcstomb.c index 6cb1e32b2bc..c0b5d997b18 100644 --- a/reactos/lib/msvcrt/stdlib/wcstomb.c +++ b/reactos/lib/msvcrt/stdlib/wcstomb.c @@ -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. */ diff --git a/reactos/lib/msvcrt/stdlib/wcstombs.c b/reactos/lib/msvcrt/stdlib/wcstombs.c index 1ba1e0f708b..06054eeada9 100644 --- a/reactos/lib/msvcrt/stdlib/wcstombs.c +++ b/reactos/lib/msvcrt/stdlib/wcstombs.c @@ -20,7 +20,7 @@ #include #include -#include +#include #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') { diff --git a/reactos/lib/msvcrt/stdlib/wcstoul.c b/reactos/lib/msvcrt/stdlib/wcstoul.c index f2831dfbb97..54a309615d2 100644 --- a/reactos/lib/msvcrt/stdlib/wcstoul.c +++ b/reactos/lib/msvcrt/stdlib/wcstoul.c @@ -3,6 +3,7 @@ #include #include #include +#include /* * Convert a unicode string to an unsigned long integer. diff --git a/reactos/lib/packet/Packet32.c b/reactos/lib/packet/Packet32.c index 8f0264b4490..72292c839ad 100644 --- a/reactos/lib/packet/Packet32.c +++ b/reactos/lib/packet/Packet32.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include #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); diff --git a/reactos/lib/packet/makefile b/reactos/lib/packet/makefile index 63357d1d2cc..d5d16deedfd 100644 --- a/reactos/lib/packet/makefile +++ b/reactos/lib/packet/makefile @@ -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 diff --git a/reactos/lib/packet/trace.c b/reactos/lib/packet/trace.c index 8104ebc6451..a332387995e 100644 --- a/reactos/lib/packet/trace.c +++ b/reactos/lib/packet/trace.c @@ -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); } } diff --git a/reactos/lib/richedit/Makefile b/reactos/lib/richedit/Makefile index f7c4ec6b64b..51b320124ea 100644 --- a/reactos/lib/richedit/Makefile +++ b/reactos/lib/richedit/Makefile @@ -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 diff --git a/reactos/lib/winedbgc/Makefile b/reactos/lib/winedbgc/Makefile index 81a80912858..6671820ecf2 100644 --- a/reactos/lib/winedbgc/Makefile +++ b/reactos/lib/winedbgc/Makefile @@ -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 \ diff --git a/reactos/lib/winedbgc/debug.c b/reactos/lib/winedbgc/debug.c index 60d88de2f0c..232988e74c1 100644 --- a/reactos/lib/winedbgc/debug.c +++ b/reactos/lib/winedbgc/debug.c @@ -29,7 +29,9 @@ #include #include #include +#include #include "porting.h" +#include "wine/debug.h" /* #include "config.h" #include "wine/port.h" @@ -40,7 +42,6 @@ #include #include -#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); diff --git a/reactos/lib/winedbgc/trace.c b/reactos/lib/winedbgc/trace.c index c1e870539cb..9049a50db08 100644 --- a/reactos/lib/winedbgc/trace.c +++ b/reactos/lib/winedbgc/trace.c @@ -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 diff --git a/reactos/lib/winedbgc/trace.h b/reactos/lib/winedbgc/trace.h index 2f1defe4154..ea9cc345dd0 100644 --- a/reactos/lib/winedbgc/trace.h +++ b/reactos/lib/winedbgc/trace.h @@ -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 diff --git a/reactos/lib/winedbgc/winedbgc.c b/reactos/lib/winedbgc/winedbgc.c index bf203b7f08c..185ef8040bd 100644 --- a/reactos/lib/winedbgc/winedbgc.c +++ b/reactos/lib/winedbgc/winedbgc.c @@ -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) diff --git a/reactos/lib/winedbgc/winedbgc.dll.dbg.c b/reactos/lib/winedbgc/winedbgc.dll.dbg.c index 8273668ddd7..a7bdf959629 100644 --- a/reactos/lib/winedbgc/winedbgc.dll.dbg.c +++ b/reactos/lib/winedbgc/winedbgc.dll.dbg.c @@ -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)); diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 7313084b3c5..e992996887e 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -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) { diff --git a/reactos/services/eventlog/eventlog.c b/reactos/services/eventlog/eventlog.c index 4126ad82d66..574b32d1ebc 100644 --- a/reactos/services/eventlog/eventlog.c +++ b/reactos/services/eventlog/eventlog.c @@ -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 #include +#include #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; diff --git a/reactos/services/eventlog/logport.c b/reactos/services/eventlog/logport.c index dd60ed754f2..67672cd0529 100644 --- a/reactos/services/eventlog/logport.c +++ b/reactos/services/eventlog/logport.c @@ -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); diff --git a/reactos/services/eventlog/makefile b/reactos/services/eventlog/makefile index bb5bff4727d..9d9354a1063 100644 --- a/reactos/services/eventlog/makefile +++ b/reactos/services/eventlog/makefile @@ -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 diff --git a/reactos/services/rpcss/makefile b/reactos/services/rpcss/makefile index dfcad6a6367..77ee86f0ee9 100644 --- a/reactos/services/rpcss/makefile +++ b/reactos/services/rpcss/makefile @@ -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 diff --git a/reactos/services/rpcss/rpcss.c b/reactos/services/rpcss/rpcss.c index 145946a03e6..c72c529f3bf 100644 --- a/reactos/services/rpcss/rpcss.c +++ b/reactos/services/rpcss/rpcss.c @@ -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 #include +#include +#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"); diff --git a/reactos/services/rpcss/rpcss.h b/reactos/services/rpcss/rpcss.h index 4bf62c6fc1c..c2f03cff0a6 100644 --- a/reactos/services/rpcss/rpcss.h +++ b/reactos/services/rpcss/rpcss.h @@ -6,4 +6,5 @@ StartEndpointMapper(VOID); #endif /* __RPCSS_H__ */ -/* EOF */ \ No newline at end of file +/* EOF */ + diff --git a/reactos/subsys/ntvdm/makefile b/reactos/subsys/ntvdm/makefile index 92f1fc261a6..ec01d8f330c 100644 --- a/reactos/subsys/ntvdm/makefile +++ b/reactos/subsys/ntvdm/makefile @@ -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 diff --git a/reactos/subsys/ntvdm/ntvdm.c b/reactos/subsys/ntvdm/ntvdm.c index 935782c0db2..fc38cdfe8f6 100644 --- a/reactos/subsys/ntvdm/ntvdm.c +++ b/reactos/subsys/ntvdm/ntvdm.c @@ -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"; diff --git a/reactos/subsys/smss/init.c b/reactos/subsys/smss/init.c index c8d1eaa9d8c..d56364ed1e2 100644 --- a/reactos/subsys/smss/init.c +++ b/reactos/subsys/smss/init.c @@ -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; diff --git a/reactos/subsys/smss/makefile b/reactos/subsys/smss/makefile index 5afb362ff00..98f45a29cec 100644 --- a/reactos/subsys/smss/makefile +++ b/reactos/subsys/smss/makefile @@ -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 diff --git a/reactos/subsys/system/autochk/makefile b/reactos/subsys/system/autochk/makefile index f4577d093c2..c48f4fa23f5 100644 --- a/reactos/subsys/system/autochk/makefile +++ b/reactos/subsys/system/autochk/makefile @@ -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 diff --git a/reactos/subsys/system/format/format.c b/reactos/subsys/system/format/format.c index 6df79a50263..d887e6b3bff 100755 --- a/reactos/subsys/system/format/format.c +++ b/reactos/subsys/system/format/format.c @@ -2,6 +2,7 @@ // Systems Internals // http://www.sysinternals.com #include +#include #define NTOS_MODE_USER #include #include @@ -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; } diff --git a/reactos/subsys/system/format/makefile b/reactos/subsys/system/format/makefile index 9044e2d407d..3cd53a774d9 100755 --- a/reactos/subsys/system/format/makefile +++ b/reactos/subsys/system/format/makefile @@ -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 diff --git a/reactos/subsys/system/gstart/Makefile b/reactos/subsys/system/gstart/Makefile index 65269d5184a..fe5b07057e8 100644 --- a/reactos/subsys/system/gstart/Makefile +++ b/reactos/subsys/system/gstart/Makefile @@ -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 diff --git a/reactos/subsys/system/services/database.c b/reactos/subsys/system/services/database.c index b144e5957c5..ceadcf3d414 100644 --- a/reactos/subsys/system/services/database.c +++ b/reactos/subsys/system/services/database.c @@ -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; diff --git a/reactos/subsys/system/services/makefile b/reactos/subsys/system/services/makefile index 7efa7a6df8c..a873eb44cd3 100644 --- a/reactos/subsys/system/services/makefile +++ b/reactos/subsys/system/services/makefile @@ -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 diff --git a/reactos/subsys/system/setup/makefile b/reactos/subsys/system/setup/makefile index 5ab4770b94b..a1907a04a8e 100644 --- a/reactos/subsys/system/setup/makefile +++ b/reactos/subsys/system/setup/makefile @@ -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 = diff --git a/reactos/subsys/system/usetup/cabinet.c b/reactos/subsys/system/usetup/cabinet.c index 1aa0edb0598..173523df612 100755 --- a/reactos/subsys/system/usetup/cabinet.c +++ b/reactos/subsys/system/usetup/cabinet.c @@ -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; } diff --git a/reactos/subsys/system/usetup/console.c b/reactos/subsys/system/usetup/console.c index 13deafa8045..6383b117461 100644 --- a/reactos/subsys/system/usetup/console.c +++ b/reactos/subsys/system/usetup/console.c @@ -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) { diff --git a/reactos/subsys/system/usetup/console.h b/reactos/subsys/system/usetup/console.h index 99ff5d97407..c68cd46ca74 100644 --- a/reactos/subsys/system/usetup/console.h +++ b/reactos/subsys/system/usetup/console.h @@ -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, diff --git a/reactos/subsys/system/usetup/infcache.c b/reactos/subsys/system/usetup/infcache.c index 7ff15668b6c..2b63afb2648 100644 --- a/reactos/subsys/system/usetup/infcache.c +++ b/reactos/subsys/system/usetup/infcache.c @@ -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 */ { diff --git a/reactos/subsys/system/usetup/inicache.c b/reactos/subsys/system/usetup/inicache.c index f3740f87687..0c732b5daad 100644 --- a/reactos/subsys/system/usetup/inicache.c +++ b/reactos/subsys/system/usetup/inicache.c @@ -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) { diff --git a/reactos/subsys/system/usetup/makefile b/reactos/subsys/system/usetup/makefile index f0752234478..302696b44db 100644 --- a/reactos/subsys/system/usetup/makefile +++ b/reactos/subsys/system/usetup/makefile @@ -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 \ diff --git a/reactos/subsys/system/usetup/partlist.c b/reactos/subsys/system/usetup/partlist.c index e87cd63450f..04045e69f87 100644 --- a/reactos/subsys/system/usetup/partlist.c +++ b/reactos/subsys/system/usetup/partlist.c @@ -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)) diff --git a/reactos/subsys/system/usetup/progress.c b/reactos/subsys/system/usetup/progress.c index eb9f2fa3d31..13ca4bf5869 100644 --- a/reactos/subsys/system/usetup/progress.c +++ b/reactos/subsys/system/usetup/progress.c @@ -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); diff --git a/reactos/subsys/system/usetup/registry.c b/reactos/subsys/system/usetup/registry.c index 4579fea0ec2..a3311f131f4 100644 --- a/reactos/subsys/system/usetup/registry.c +++ b/reactos/subsys/system/usetup/registry.c @@ -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; } diff --git a/reactos/subsys/system/usetup/usetup.c b/reactos/subsys/system/usetup/usetup.c index 6c989c276d1..82d92c3a020 100644 --- a/reactos/subsys/system/usetup/usetup.c +++ b/reactos/subsys/system/usetup/usetup.c @@ -43,6 +43,8 @@ #include "format.h" #include "fslist.h" #include "cabinet.h" +#include "filesup.h" +#include "drivesup.h" #define NDEBUG #include @@ -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: diff --git a/reactos/subsys/system/welcome/Makefile b/reactos/subsys/system/welcome/Makefile index dad9a62ee50..f4a38ddf1a1 100755 --- a/reactos/subsys/system/welcome/Makefile +++ b/reactos/subsys/system/welcome/Makefile @@ -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 diff --git a/reactos/subsys/system/winlogon/makefile b/reactos/subsys/system/winlogon/makefile index 18a5051edc4..7247ed2f45b 100644 --- a/reactos/subsys/system/winlogon/makefile +++ b/reactos/subsys/system/winlogon/makefile @@ -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 diff --git a/reactos/subsys/system/winlogon/winlogon.c b/reactos/subsys/system/winlogon/winlogon.c index af65f37742f..403b84cc43d 100644 --- a/reactos/subsys/system/winlogon/winlogon.c +++ b/reactos/subsys/system/winlogon/winlogon.c @@ -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; /* diff --git a/reactos/tools/Makefile b/reactos/tools/Makefile index c212e70fe79..f8ab6e0a53a 100644 --- a/reactos/tools/Makefile +++ b/reactos/tools/Makefile @@ -1,5 +1,7 @@ PATH_TO_TOP = .. +CFLAGS += -Wall -Werror + TOOLS = \ buildno$(EXE_POSTFIX) \ depends$(EXE_POSTFIX) \ diff --git a/reactos/tools/buildno.c b/reactos/tools/buildno.c index 86d9be5ff9e..2defd35fd28 100644 --- a/reactos/tools/buildno.c +++ b/reactos/tools/buildno.c @@ -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 #include #include +#include #include "../include/reactos/version.h" #define FALSE 0 diff --git a/reactos/tools/cabman/cabinet.cxx b/reactos/tools/cabman/cabinet.cxx index 18c59267a8a..ca96dc71944 100755 --- a/reactos/tools/cabman/cabinet.cxx +++ b/reactos/tools/cabman/cabinet.cxx @@ -20,6 +20,39 @@ #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) diff --git a/reactos/tools/cabman/cabinet.h b/reactos/tools/cabman/cabinet.h index 59874068236..b200a8045c2 100755 --- a/reactos/tools/cabman/cabinet.h +++ b/reactos/tools/cabman/cabinet.h @@ -32,21 +32,6 @@ #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 */ diff --git a/reactos/tools/cabman/dfp.cxx b/reactos/tools/cabman/dfp.cxx index d9de8ec6bdb..7887a2b1e5f 100755 --- a/reactos/tools/cabman/dfp.cxx +++ b/reactos/tools/cabman/dfp.cxx @@ -16,6 +16,40 @@ #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; } diff --git a/reactos/tools/cabman/main.cxx b/reactos/tools/cabman/main.cxx index 7ada7ada635..faede8131d7 100755 --- a/reactos/tools/cabman/main.cxx +++ b/reactos/tools/cabman/main.cxx @@ -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; diff --git a/reactos/tools/cabman/makefile b/reactos/tools/cabman/makefile index 3e46d93bb10..948343341fe 100755 --- a/reactos/tools/cabman/makefile +++ b/reactos/tools/cabman/makefile @@ -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 diff --git a/reactos/tools/cabman/makefile.win32 b/reactos/tools/cabman/makefile.win32 index b347d6dfce6..d1201899cbd 100755 --- a/reactos/tools/cabman/makefile.win32 +++ b/reactos/tools/cabman/makefile.win32 @@ -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) diff --git a/reactos/tools/cdmake/Makefile b/reactos/tools/cdmake/Makefile index 34dc6cfed8c..6b3bc0dafe1 100644 --- a/reactos/tools/cdmake/Makefile +++ b/reactos/tools/cdmake/Makefile @@ -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 diff --git a/reactos/tools/create_nls/Makefile b/reactos/tools/create_nls/Makefile index 7056ce85b15..bdcfad327b1 100644 --- a/reactos/tools/create_nls/Makefile +++ b/reactos/tools/create_nls/Makefile @@ -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 diff --git a/reactos/tools/mkhive/Makefile b/reactos/tools/mkhive/Makefile index cb50408e290..2b3bfe5545f 100644 --- a/reactos/tools/mkhive/Makefile +++ b/reactos/tools/mkhive/Makefile @@ -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 diff --git a/reactos/tools/mkhive/binhive.c b/reactos/tools/mkhive/binhive.c index 2edad1516f7..f9e1d3d4d0c 100644 --- a/reactos/tools/mkhive/binhive.c +++ b/reactos/tools/mkhive/binhive.c @@ -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 #include #include +#include #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; diff --git a/reactos/tools/mkhive/infcache.c b/reactos/tools/mkhive/infcache.c index d5ce2c984cc..0273610094c 100644 --- a/reactos/tools/mkhive/infcache.c +++ b/reactos/tools/mkhive/infcache.c @@ -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 #include #include +#include #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 */ { diff --git a/reactos/tools/mkhive/mkhive.c b/reactos/tools/mkhive/mkhive.c index e8a52954217..fa8f536e036 100644 --- a/reactos/tools/mkhive/mkhive.c +++ b/reactos/tools/mkhive/mkhive.c @@ -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 #include +#include #include "mkhive.h" #include "registry.h" diff --git a/reactos/tools/mkhive/reginf.c b/reactos/tools/mkhive/reginf.c index 0af7e46b137..9bc7176fcc6 100644 --- a/reactos/tools/mkhive/reginf.c +++ b/reactos/tools/mkhive/reginf.c @@ -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 #include +#include #include "mkhive.h" #include "registry.h" diff --git a/reactos/tools/mkhive/registry.c b/reactos/tools/mkhive/registry.c index 41c40233b47..6afd9051de8 100644 --- a/reactos/tools/mkhive/registry.c +++ b/reactos/tools/mkhive/registry.c @@ -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 #include +#include #include "mkhive.h" #include "registry.h" diff --git a/reactos/tools/rcopy.c b/reactos/tools/rcopy.c index ee35732f58d..3270a26a1ca 100644 --- a/reactos/tools/rcopy.c +++ b/reactos/tools/rcopy.c @@ -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); diff --git a/reactos/tools/regtests.c b/reactos/tools/regtests.c index 2477e1010dc..d7aa38cb83b 100755 --- a/reactos/tools/regtests.c +++ b/reactos/tools/regtests.c @@ -293,8 +293,6 @@ static char HELP[] = int main(int argc, char **argv) { char buf[MAX_PATH]; - int i; - if (argc < 2) { puts(HELP); diff --git a/reactos/tools/rgenstat/Makefile b/reactos/tools/rgenstat/Makefile index 4d5291c7357..2befe0d67e0 100755 --- a/reactos/tools/rgenstat/Makefile +++ b/reactos/tools/rgenstat/Makefile @@ -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 diff --git a/reactos/tools/rgenstat/rgenstat.c b/reactos/tools/rgenstat/rgenstat.c index 126602d8253..802a3ed4415 100755 --- a/reactos/tools/rgenstat/rgenstat.c +++ b/reactos/tools/rgenstat/rgenstat.c @@ -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) { diff --git a/reactos/tools/rline.c b/reactos/tools/rline.c index fe3a15cf898..c6bdda1da90 100755 --- a/reactos/tools/rline.c +++ b/reactos/tools/rline.c @@ -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; diff --git a/reactos/tools/rmkdir.c b/reactos/tools/rmkdir.c index c3b903a3be6..fe9be2f81f4 100644 --- a/reactos/tools/rmkdir.c +++ b/reactos/tools/rmkdir.c @@ -1,6 +1,8 @@ #include #include #include +#include +#include #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) diff --git a/reactos/tools/rsym.c b/reactos/tools/rsym.c index 50a31b3ddb2..5971dcf0432 100644 --- a/reactos/tools/rsym.c +++ b/reactos/tools/rsym.c @@ -159,7 +159,6 @@ int main(int argc, char* argv[]) char* path2; FILE* in; FILE* out; - char* buf; int n_in; int n_out; diff --git a/reactos/tools/rtouch.c b/reactos/tools/rtouch.c index 1d9c7c6b994..8c13e73ff87 100755 --- a/reactos/tools/rtouch.c +++ b/reactos/tools/rtouch.c @@ -3,10 +3,12 @@ #ifdef WIN32 #include +#include #else #include -#include #endif +#include +#include #include #include diff --git a/reactos/tools/wmc/getopt.c b/reactos/tools/wmc/getopt.c index df79d7ee187..b82688b7928 100644 --- a/reactos/tools/wmc/getopt.c +++ b/reactos/tools/wmc/getopt.c @@ -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; diff --git a/reactos/tools/wmc/makefile b/reactos/tools/wmc/makefile index 5de3fa87959..ee412decbcc 100644 --- a/reactos/tools/wmc/makefile +++ b/reactos/tools/wmc/makefile @@ -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 -- 2.17.1