Generate code without L-value casts.
Modified: trunk/reactos/tools/widl/ChangeLog
Modified: trunk/reactos/tools/widl/client.c
Modified: trunk/reactos/tools/widl/server.c

Modified: trunk/reactos/tools/widl/ChangeLog
--- trunk/reactos/tools/widl/ChangeLog	2005-03-20 20:46:16 UTC (rev 14236)
+++ trunk/reactos/tools/widl/ChangeLog	2005-03-20 21:35:12 UTC (rev 14237)
@@ -1,5 +1,12 @@
 ChangeLog
 
+2005-03-20 navaraf
+
+   tools/widl/client.c
+   tools/widl/server.c
+
+Generate code without L-value casts.
+
 2005-03-20 ekohl
 
    tools/widl/client.c

Modified: trunk/reactos/tools/widl/client.c
--- trunk/reactos/tools/widl/client.c	2005-03-20 20:46:16 UTC (rev 14236)
+++ trunk/reactos/tools/widl/client.c	2005-03-20 21:35:12 UTC (rev 14237)
@@ -510,6 +510,9 @@
                         fprintf(client, "*");
                     write_name(client, var);
                     fprintf(client, ";\n");
+                    print_client("_StubMsg.Buffer += sizeof(");
+                    write_type(client, var->type, NULL, var->tname);
+                    fprintf(client, ");\n");
                     fprintf(client, "\n");
 
                     last_size = size;

Modified: trunk/reactos/tools/widl/server.c
--- trunk/reactos/tools/widl/server.c	2005-03-20 20:46:16 UTC (rev 14236)
+++ trunk/reactos/tools/widl/server.c	2005-03-20 21:35:12 UTC (rev 14237)
@@ -639,9 +639,13 @@
                     fprintf(server, "\n");
                     print_server("*((");
                     write_type(server, var->type, NULL, var->tname);
-                    fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = *");
+                    fprintf(server, " __RPC_FAR *)_StubMsg.Buffer) = *");
                     write_name(server, var);
                     fprintf(server, ";\n");
+
+                    print_server("_StubMsg.Buffer += sizeof(");
+                    write_type(server, var->type, NULL, var->tname);
+                    fprintf(server, ");");
                 }
                 else
                 {
@@ -692,7 +696,10 @@
             print_server("_StubMsg.Buffer += %u;\n", alignment);
         print_server("*((");
         write_type(server, def->type, def, def->tname);
-        fprintf(server, " __RPC_FAR *)_StubMsg.Buffer)++ = _RetVal;\n");
+        fprintf(server, " __RPC_FAR *)_StubMsg.Buffer) = _RetVal;\n");
+        print_server("_StubMsg.Buffer += sizeof(");
+        write_type(server, def->type, def, def->tname);
+        fprintf(server, ");\n");
     }
 }