Fixed some illegal lvalue casts / increments.

diff --git a/dlls/kernel/ne_module.c b/dlls/kernel/ne_module.c
index 3746074..5a68e72 100644
--- a/dlls/kernel/ne_module.c
+++ b/dlls/kernel/ne_module.c
@@ -868,7 +868,7 @@
                     bundle->first = bundle->last =
                         oldbundle->last + nr_entries;
                     bundle->next = 0;
-                    (BYTE *)entry += sizeof(ET_BUNDLE);
+		    entry = (ET_ENTRY*)(((BYTE*)entry)+sizeof(ET_BUNDLE));
                 }
             }
         }
diff --git a/dlls/kernel/ne_segment.c b/dlls/kernel/ne_segment.c
index fe02b46..ab4ea64 100644
--- a/dlls/kernel/ne_segment.c
+++ b/dlls/kernel/ne_segment.c
@@ -211,8 +211,10 @@
 
       ReadFile(hf, buff, size, &res, NULL);
       while(curr < buff + size) {
-	unsigned int rept = *((short*) curr)++;
-	unsigned int len = *((short*) curr)++;
+	unsigned int rept = ((short*)curr)[0];
+	unsigned int len =  ((short*)curr)[1];
+
+	curr += 2*sizeof(short);
 	for(; rept > 0; rept--) {
 	  char* bytes = curr;
 	  unsigned int byte;
diff --git a/dlls/kernel/thunk.c b/dlls/kernel/thunk.c
index 7fc22f2..20ad9fb 100644
--- a/dlls/kernel/thunk.c
+++ b/dlls/kernel/thunk.c
@@ -1470,18 +1470,19 @@
      *   call __FLATCS:__wine_call_from_16_thunk
      */
 
-    *x++ = 0xB8; *((WORD *)x)++ = ds;
+    *x++ = 0xB8; *(WORD *)x = ds; x += sizeof(WORD);
     *x++ = 0x8E; *x++ = 0xC0;
     *x++ = 0x66; *x++ = 0x0F; *x++ = 0xB7; *x++ = 0xC9;
     *x++ = 0x67; *x++ = 0x66; *x++ = 0x26; *x++ = 0x8B;
-                 *x++ = 0x91; *((DWORD *)x)++ = context->Edx;
+                 *x++ = 0x91; *(DWORD *)x = context->Edx; x += sizeof(DWORD);
 
     *x++ = 0x55;
     *x++ = 0x66; *x++ = 0x52;
     *x++ = 0x52;
     *x++ = 0x66; *x++ = 0x52;
-    *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x)++ = (DWORD)__wine_call_from_16_thunk;
-                              *((WORD *)x)++ = cs;
+    *x++ = 0x66; *x++ = 0x9A;
+    *(void **)x = __wine_call_from_16_thunk; x += sizeof(void *);
+    *(WORD *)x = cs; x += sizeof(WORD);
 
     /* Jump to the stub code just created */
     context->Eip = LOWORD(context->Eax);
@@ -1530,15 +1531,16 @@
          */
 
         *x++ = 0x66; *x++ = 0x33; *x++ = 0xC0;
-        *x++ = 0x66; *x++ = 0xBA; *((DWORD *)x)++ = (DWORD)td;
-        *x++ = 0x9A; *((DWORD *)x)++ = procAddress;
+        *x++ = 0x66; *x++ = 0xBA; *(void **)x = td; x += sizeof(void *);
+        *x++ = 0x9A; *(DWORD *)x = procAddress; x += sizeof(DWORD);
 
         *x++ = 0x55;
         *x++ = 0x66; *x++ = 0x52;
         *x++ = 0x52;
         *x++ = 0x66; *x++ = 0x52;
-        *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x)++ = (DWORD)__wine_call_from_16_thunk;
-                                  *((WORD *)x)++ = cs;
+        *x++ = 0x66; *x++ = 0x9A;
+        *(void **)x = __wine_call_from_16_thunk; x += sizeof(void *);
+        *(WORD *)x = cs; x += sizeof(WORD);
 
         /* Jump to the stub code just created */
         context->Eip = LOWORD(context->Eax);