more fixes for GCC4
Modified: trunk/reactos/lib/advapi32/reg/reg.c
Modified: trunk/reactos/lib/mesa32/src/main/texcompress_s3tc.c
Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c
Modified: trunk/reactos/subsys/win32k/ntuser/input.c
Modified: trunk/reactos/tools/wrc/lex.yy.c

Modified: trunk/reactos/lib/advapi32/reg/reg.c
--- trunk/reactos/lib/advapi32/reg/reg.c	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/lib/advapi32/reg/reg.c	2005-05-08 03:09:14 UTC (rev 15110)
@@ -618,7 +618,7 @@
   InitializeObjectAttributes(&ObjectAttributes,
 			     &SubKeyName,
 			     OBJ_CASE_INSENSITIVE,
-			     (HANDLE)ParentKey,
+			     ParentKey,
 			     NULL);
 
   Status = NtOpenKey (&TargetKey,
@@ -668,7 +668,7 @@
   InitializeObjectAttributes (&ObjectAttributes,
 			      &SubKeyName,
 			      OBJ_CASE_INSENSITIVE,
-			      (HANDLE)ParentKey,
+			      ParentKey,
 			      NULL);
   Status = NtOpenKey (&TargetKey,
 		      DELETE,
@@ -1178,7 +1178,7 @@
                 if (len > *count) status = STATUS_BUFFER_OVERFLOW;
                 else
                 {
-                    RtlUnicodeToMultiByteN( data, len, NULL, (WCHAR *)(buf_ptr + info->DataOffset),
+                    RtlUnicodeToMultiByteN( (PCHAR)data, len, NULL, (WCHAR *)(buf_ptr + info->DataOffset),
                                             total_size - info->DataOffset );
                     /* if the type is REG_SZ and data is not 0-terminated
                      * and there is enough space in the buffer NT appends a \0 */
@@ -3179,7 +3179,7 @@
                        NULL,
                        0,
                        REG_SZ,
-                       lpData,
+                       (CONST BYTE*)lpData,
                        strlen(lpData) + 1);
   
   if (hSubKey != hKey)

Modified: trunk/reactos/lib/mesa32/src/main/texcompress_s3tc.c
--- trunk/reactos/lib/mesa32/src/main/texcompress_s3tc.c	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/lib/mesa32/src/main/texcompress_s3tc.c	2005-05-08 03:09:14 UTC (rev 15110)
@@ -286,7 +286,7 @@
                             GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* just sample as GLchan and convert to float here */
-   GLchan rgba[4];
+   GLchan rgba[4] = {0, 0, 0, 0};
    fetch_texel_2d_rgb_dxt1(texImage, i, j, k, rgba);
    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -308,7 +308,7 @@
                             GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* just sample as GLchan and convert to float here */
-   GLchan rgba[4];
+   GLchan rgba[4] = {0, 0, 0, 0};
    fetch_texel_2d_rgba_dxt1(texImage, i, j, k, rgba);
    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -330,7 +330,7 @@
                             GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* just sample as GLchan and convert to float here */
-   GLchan rgba[4];
+   GLchan rgba[4] = {0, 0, 0, 0};
    fetch_texel_2d_rgba_dxt3(texImage, i, j, k, rgba);
    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);
@@ -352,7 +352,7 @@
                             GLint i, GLint j, GLint k, GLfloat *texel )
 {
    /* just sample as GLchan and convert to float here */
-   GLchan rgba[4];
+   GLchan rgba[4] = {0, 0, 0, 0};
    fetch_texel_2d_rgba_dxt5(texImage, i, j, k, rgba);
    texel[RCOMP] = CHAN_TO_FLOAT(rgba[RCOMP]);
    texel[GCOMP] = CHAN_TO_FLOAT(rgba[GCOMP]);

Modified: trunk/reactos/ntoskrnl/include/internal/ps.h
--- trunk/reactos/ntoskrnl/include/internal/ps.h	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/ntoskrnl/include/internal/ps.h	2005-05-08 03:09:14 UTC (rev 15110)
@@ -224,7 +224,7 @@
         ULONGLONG         Filler;                       /* 158 */
     };
     ULONG                 Session;                      /* 160 */
-    UCHAR                 ImageFileName[16];            /* 164 */
+    CHAR                  ImageFileName[16];            /* 164 */
     LIST_ENTRY            JobLinks;                     /* 174 */
     PVOID                 LockedPagesList;              /* 17C */
     LIST_ENTRY            ThreadListHead;               /* 184 */

Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c
--- trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c	2005-05-08 03:09:14 UTC (rev 15110)
@@ -690,7 +690,7 @@
       HANDLE ThreadId;
       PCHAR ptr = &Data[0];
 
-      GspHex2Long (&ptr, (PULONG) &uThreadId);
+      GspHex2Long (&ptr, (PLONG) &uThreadId);
       ThreadId = (HANDLE)uThreadId;
 
       if (!NT_SUCCESS (PsLookupThreadByThreadId (ThreadId, &ThreadInfo)))

Modified: trunk/reactos/subsys/win32k/ntuser/input.c
--- trunk/reactos/subsys/win32k/ntuser/input.c	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/subsys/win32k/ntuser/input.c	2005-05-08 03:09:14 UTC (rev 15110)
@@ -455,7 +455,6 @@
        */
       while (InputThreadsRunning)
 	{
-	  KEY_EVENT_RECORD KeyEvent;
 	  BOOLEAN NumKeys = 1;
 	  KEYBOARD_INPUT_DATA KeyInput;
 	  KEYBOARD_INPUT_DATA NextKeyInput;
@@ -663,7 +662,7 @@
 			    &hWnd,
 			    &id))
 	        {
-	          if (KeyEvent.bKeyDown)
+	          if (!(KeyInput.Flags & KEY_BREAK))
 		    {
 		      DPRINT("Hot key pressed (hWnd %lx, id %d)\n", hWnd, id);
 		      MsqPostHotKeyMessage (Thread,

Modified: trunk/reactos/tools/wrc/lex.yy.c
--- trunk/reactos/tools/wrc/lex.yy.c	2005-05-08 02:30:45 UTC (rev 15109)
+++ trunk/reactos/tools/wrc/lex.yy.c	2005-05-08 03:09:14 UTC (rev 15110)
@@ -7474,8 +7474,11 @@
 		char *fname;
 		yy_pop_state();
 		lineno = (int)strtol(yytext, &cptr, 10);
+#if 0
+		/* ignore malformed line numbers by gcc: # 0 "<built-in>" */
 		if(!lineno)
 			yyerror("Malformed '#...' line-directive; invalid linenumber");
+#endif
 		fname = strchr(cptr, '"');
 		if(!fname)
 			yyerror("Malformed '#...' line-directive; missing filename");