[ros-kernel] warning fixes

Jonathan Wilson jonwil at tpgi.com.au
Tue Nov 18 12:13:02 CET 2003


adds -Werror to lib\zlib\makefile
fixes the header thing suggested in the "Jonathon Wilson patch broke Cross 
Compiling" thread (i.e. direct.h to dirent.h)
and makes regtests build with -Wall -Werror

-------------- next part --------------
Index: lib/zlib/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/lib/zlib/Makefile,v
retrieving revision 1.5
diff -u -w -r1.5 Makefile
--- lib/zlib/Makefile	7 Aug 2003 04:03:24 -0000	1.5
+++ lib/zlib/Makefile	18 Nov 2003 04:01:07 -0000
@@ -8,7 +8,7 @@
 
 TARGET_CFLAGS = \
  -MMD -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- -Wstrict-prototypes -Wmissing-prototypes
+ -Wstrict-prototypes -Wmissing-prototypes -Werror
 
 # require os code to explicitly request A/W version of structs/functions
 TARGET_CFLAGS += -D_DISABLE_TIDENTS
Index: tools/rmkdir.c
===================================================================
RCS file: /CVS/ReactOS/reactos/tools/rmkdir.c,v
retrieving revision 1.4
diff -u -w -r1.4 rmkdir.c
--- tools/rmkdir.c	14 Nov 2003 17:13:35 -0000	1.4
+++ tools/rmkdir.c	18 Nov 2003 04:01:08 -0000
@@ -2,7 +2,7 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#include <direct.h>
+#include <dirent.h>
 
 #ifdef UNIX_PATHS
 #define DIR_SEPARATOR_CHAR '/'
Index: regtests/kmregtests/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/kmregtests/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- regtests/kmregtests/Makefile	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/kmregtests/Makefile	18 Nov 2003 04:01:08 -0000
@@ -10,7 +10,7 @@
 
 TARGET_LIBS = $(SDK_PATH_LIB)/rtshared.a
 
-TARGET_CFLAGS = -I../shared
+TARGET_CFLAGS = -I../shared -Werror -Wall
 
 TARGET_GENREGTESTS = yes
 
Index: regtests/kmregtests/driver.c
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/kmregtests/driver.c,v
retrieving revision 1.1
diff -u -w -r1.1 driver.c
--- regtests/kmregtests/driver.c	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/kmregtests/driver.c	18 Nov 2003 04:01:08 -0000
@@ -149,7 +149,6 @@
 {
   PDEVICE_OBJECT DeviceObject;
   UNICODE_STRING DeviceName;
-  UNICODE_STRING DosName;
   NTSTATUS Status;
 
   /* Register driver routines */
Index: regtests/kmrtint/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/kmrtint/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- regtests/kmrtint/Makefile	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/kmrtint/Makefile	18 Nov 2003 04:01:08 -0000
@@ -10,7 +10,7 @@
 
 TARGET_SDKLIBS = ntdll.a kernel32.a
 
-TARGET_CFLAGS = -I../shared -I../kmregtests
+TARGET_CFLAGS = -I../shared -I../kmregtests -Werror -Wall
 
 TARGET_BASE = 0x50000000
 
Index: regtests/regtests/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/regtests/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- regtests/regtests/Makefile	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/regtests/Makefile	18 Nov 2003 04:01:09 -0000
@@ -12,7 +12,7 @@
 
 TARGET_SDKLIBS = rtshared.a ntdll.a kernel32.a
 
-TARGET_CFLAGS = -I../shared
+TARGET_CFLAGS = -I../shared -Wall -Werror
 
 TARGET_OBJECTS = \
   regtests.o
Index: regtests/shared/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/shared/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- regtests/shared/Makefile	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/shared/Makefile	18 Nov 2003 04:01:09 -0000
@@ -8,6 +8,8 @@
 
 TARGET_NAME = rtshared
 
+TARGET_CFLAGS = -Wall -Werror
+
 TARGET_OBJECTS = \
   regtests.o
 
Index: regtests/shared/regtests.c
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/shared/regtests.c,v
retrieving revision 1.1
diff -u -w -r1.1 regtests.c
--- regtests/shared/regtests.c	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/shared/regtests.c	18 Nov 2003 04:01:09 -0000
@@ -10,6 +10,7 @@
 #define NTOS_MODE_USER
 #include <ntos.h>
 #include "regtests.h"
+#include <string.h>
 
 #define NDEBUG
 #include <debug.h>
Index: regtests/win32base/Makefile
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/win32base/Makefile,v
retrieving revision 1.1
diff -u -w -r1.1 Makefile
--- regtests/win32base/Makefile	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/win32base/Makefile	18 Nov 2003 04:01:09 -0000
@@ -10,7 +10,7 @@
 
 TARGET_SDKLIBS = rtshared.a ntdll.a kernel32.a
 
-TARGET_CFLAGS = -I../shared
+TARGET_CFLAGS = -I../shared -Wall -Werror
 
 TARGET_BASE = 0x60000000
 
Index: regtests/win32base/file-1.c
===================================================================
RCS file: /CVS/ReactOS/reactos/regtests/win32base/file-1.c,v
retrieving revision 1.1
diff -u -w -r1.1 file-1.c
--- regtests/win32base/file-1.c	11 Jul 2003 18:13:57 -0000	1.1
+++ regtests/win32base/file-1.c	18 Nov 2003 04:01:09 -0000
@@ -1,6 +1,7 @@
 #include <windows.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include "regtests.h"
 
@@ -21,7 +22,7 @@
 
   if (file == INVALID_HANDLE_VALUE)
     {
-      sprintf(Buffer, "Error opening file (Status %x)", GetLastError());
+      sprintf(Buffer, "Error opening file (Status %lx)", GetLastError());
       return TS_FAILED;
     }
 
@@ -30,7 +31,7 @@
 
   if (WriteFile( file, buffer, 4096, &wrote, NULL) == FALSE)
     {
-      sprintf(Buffer, "Error writing file (Status %x)", GetLastError());
+      sprintf(Buffer, "Error writing file (Status %lx)", GetLastError());
       return TS_FAILED;
     }
 
@@ -38,7 +39,7 @@
 
   if (ReadFile( file, buffer, 4096, &wrote, NULL) == FALSE)
     {
-      sprintf(Buffer, "Error reading file (Status %x)", GetLastError());
+      sprintf(Buffer, "Error reading file (Status %lx)", GetLastError());
       return TS_FAILED;
     }
   for (c = 0; c < sizeof(buffer); c++)


More information about the Ros-kernel mailing list