server: Reorganize some requests to avoid padding, and make remaining padding explicit.
diff --git a/server/protocol.def b/server/protocol.def
index e14aefe..737714f 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -196,6 +196,7 @@
     int             x;         /* x position */
     int             y;         /* y position */
     unsigned int    hw_id;     /* unique id */
+    int             __pad;
 };
 
 struct callback_msg_data
@@ -554,8 +555,8 @@
 @REPLY
     process_id_t pid;          /* process id of the new thread's process */
     thread_id_t  tid;          /* thread id of the new thread */
-    data_size_t  info_size;    /* total size of startup info */
     timeout_t    server_start; /* server start time */
+    data_size_t  info_size;    /* total size of startup info */
     int          version;      /* protocol version */
 @END
 
@@ -677,6 +678,7 @@
 
 /* Notify the server that a dll is being unloaded */
 @REQ(unload_dll)
+    int          __pad;
     mod_handle_t base;         /* base address */
 @END
 
@@ -1335,8 +1337,8 @@
 @REQ(create_mapping)
     unsigned int access;        /* wanted access rights */
     unsigned int attributes;    /* object attributes */
-    mem_size_t   size;          /* mapping size */
     unsigned int protect;       /* protection flags (see below) */
+    mem_size_t   size;          /* mapping size */
     obj_handle_t file_handle;   /* file handle */
     VARARG(objattr,object_attributes); /* object attributes */
 @REPLY
@@ -1986,8 +1988,8 @@
 /* Create an async I/O */
 @REQ(register_async)
     int          type;          /* type of queue to look after */
-    int          count;         /* count - usually # of bytes to be read/written */
     async_data_t async;         /* async I/O parameters */
+    int          count;         /* count - usually # of bytes to be read/written */
 @END
 #define ASYNC_TYPE_READ  0x01
 #define ASYNC_TYPE_WRITE 0x02
@@ -2028,11 +2030,11 @@
     unsigned int   attributes;   /* object attributes */
     obj_handle_t   rootdir;      /* root directory */
     unsigned int   options;
-    unsigned int   flags;
     unsigned int   maxinstances;
     unsigned int   outsize;
     unsigned int   insize;
     timeout_t      timeout;
+    unsigned int   flags;
     VARARG(name,unicode_str);    /* pipe name */
 @REPLY
     obj_handle_t   handle;       /* handle to the pipe */
@@ -2841,8 +2843,8 @@
     unsigned int   access;        /* wanted access rights */
     unsigned int   attributes;    /* object attributes */
     obj_handle_t   rootdir;       /* root directory */
-    unsigned int   max_msgsize;
     timeout_t      read_timeout;
+    unsigned int   max_msgsize;
     VARARG(name,unicode_str);     /* mailslot name */
 @REPLY
     obj_handle_t   handle;        /* handle to the mailslot */
@@ -2852,11 +2854,11 @@
 /* Set mailslot information */
 @REQ(set_mailslot_info)
     obj_handle_t   handle;        /* handle to the mailslot */
+    timeout_t      read_timeout;
     unsigned int   flags;
-    timeout_t      read_timeout;
 @REPLY
-    unsigned int   max_msgsize;
     timeout_t      read_timeout;
+    unsigned int   max_msgsize;
 @END
 #define MAILSLOT_SET_READ_TIMEOUT  1
 
@@ -2969,8 +2971,8 @@
     unsigned int access;          /* wanted access rights */
     unsigned int attributes;      /* object attributes */
     obj_handle_t rootdir;         /* root directory */
-    obj_handle_t manager;         /* device manager */
     client_ptr_t user_ptr;        /* opaque ptr for use by client */
+    obj_handle_t manager;         /* device manager */
     VARARG(name,unicode_str);     /* object name */
 @REPLY
     obj_handle_t handle;          /* handle to the device */
@@ -3074,8 +3076,8 @@
 /* associate object with completion port */
 @REQ(set_completion_info)
     obj_handle_t  handle;         /* object handle */
-    obj_handle_t  chandle;        /* port handle */
     apc_param_t   ckey;           /* completion key */
+    obj_handle_t  chandle;        /* port handle */
 @END
 
 
diff --git a/server/queue.c b/server/queue.c
index 697a268..ab524a7 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -1723,6 +1723,7 @@
         release_object( thread );
         return;
     }
+    memset( data, 0, sizeof(*data) );
     data->x    = req->x;
     data->y    = req->y;
     data->info = req->info;
diff --git a/server/trace.c b/server/trace.c
index 7fc865e..557880d 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1004,10 +1004,10 @@
 {
     fprintf( stderr, " pid=%04x,", req->pid );
     fprintf( stderr, " tid=%04x,", req->tid );
-    fprintf( stderr, " info_size=%u,", req->info_size );
     fprintf( stderr, " server_start=" );
     dump_timeout( &req->server_start );
     fprintf( stderr, "," );
+    fprintf( stderr, " info_size=%u,", req->info_size );
     fprintf( stderr, " version=%d", req->version );
 }
 
@@ -1841,10 +1841,10 @@
 {
     fprintf( stderr, " access=%08x,", req->access );
     fprintf( stderr, " attributes=%08x,", req->attributes );
+    fprintf( stderr, " protect=%08x,", req->protect );
     fprintf( stderr, " size=" );
     dump_uint64( &req->size );
     fprintf( stderr, "," );
-    fprintf( stderr, " protect=%08x,", req->protect );
     fprintf( stderr, " file_handle=%04x,", req->file_handle );
     fprintf( stderr, " objattr=" );
     dump_varargs_object_attributes( cur_size );
@@ -2606,9 +2606,10 @@
 static void dump_register_async_request( const struct register_async_request *req )
 {
     fprintf( stderr, " type=%d,", req->type );
-    fprintf( stderr, " count=%d,", req->count );
     fprintf( stderr, " async=" );
     dump_async_data( &req->async );
+    fprintf( stderr, "," );
+    fprintf( stderr, " count=%d", req->count );
 }
 
 static void dump_cancel_async_request( const struct cancel_async_request *req )
@@ -2656,13 +2657,13 @@
     fprintf( stderr, " attributes=%08x,", req->attributes );
     fprintf( stderr, " rootdir=%04x,", req->rootdir );
     fprintf( stderr, " options=%08x,", req->options );
-    fprintf( stderr, " flags=%08x,", req->flags );
     fprintf( stderr, " maxinstances=%08x,", req->maxinstances );
     fprintf( stderr, " outsize=%08x,", req->outsize );
     fprintf( stderr, " insize=%08x,", req->insize );
     fprintf( stderr, " timeout=" );
     dump_timeout( &req->timeout );
     fprintf( stderr, "," );
+    fprintf( stderr, " flags=%08x,", req->flags );
     fprintf( stderr, " name=" );
     dump_varargs_unicode_str( cur_size );
 }
@@ -3650,10 +3651,10 @@
     fprintf( stderr, " access=%08x,", req->access );
     fprintf( stderr, " attributes=%08x,", req->attributes );
     fprintf( stderr, " rootdir=%04x,", req->rootdir );
-    fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
     fprintf( stderr, " read_timeout=" );
     dump_timeout( &req->read_timeout );
     fprintf( stderr, "," );
+    fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
     fprintf( stderr, " name=" );
     dump_varargs_unicode_str( cur_size );
 }
@@ -3666,16 +3667,18 @@
 static void dump_set_mailslot_info_request( const struct set_mailslot_info_request *req )
 {
     fprintf( stderr, " handle=%04x,", req->handle );
-    fprintf( stderr, " flags=%08x,", req->flags );
     fprintf( stderr, " read_timeout=" );
     dump_timeout( &req->read_timeout );
+    fprintf( stderr, "," );
+    fprintf( stderr, " flags=%08x", req->flags );
 }
 
 static void dump_set_mailslot_info_reply( const struct set_mailslot_info_reply *req )
 {
-    fprintf( stderr, " max_msgsize=%08x,", req->max_msgsize );
     fprintf( stderr, " read_timeout=" );
     dump_timeout( &req->read_timeout );
+    fprintf( stderr, "," );
+    fprintf( stderr, " max_msgsize=%08x", req->max_msgsize );
 }
 
 static void dump_create_directory_request( const struct create_directory_request *req )
@@ -3817,10 +3820,10 @@
     fprintf( stderr, " access=%08x,", req->access );
     fprintf( stderr, " attributes=%08x,", req->attributes );
     fprintf( stderr, " rootdir=%04x,", req->rootdir );
-    fprintf( stderr, " manager=%04x,", req->manager );
     fprintf( stderr, " user_ptr=" );
     dump_uint64( &req->user_ptr );
     fprintf( stderr, "," );
+    fprintf( stderr, " manager=%04x,", req->manager );
     fprintf( stderr, " name=" );
     dump_varargs_unicode_str( cur_size );
 }
@@ -3959,9 +3962,10 @@
 static void dump_set_completion_info_request( const struct set_completion_info_request *req )
 {
     fprintf( stderr, " handle=%04x,", req->handle );
-    fprintf( stderr, " chandle=%04x,", req->chandle );
     fprintf( stderr, " ckey=" );
     dump_uint64( &req->ckey );
+    fprintf( stderr, "," );
+    fprintf( stderr, " chandle=%04x", req->chandle );
 }
 
 static void dump_add_fd_completion_request( const struct add_fd_completion_request *req )