Authors: Andreas Mohr <amohr@codeweavers.com>, Dimitrie O. Paun <dimi@cs.toronto.edu>, Patrik Stridvall <ps@leissner.se>
Various warning fixes.

diff --git a/server/atom.c b/server/atom.c
index 5e65b23..0e9f477 100644
--- a/server/atom.c
+++ b/server/atom.c
@@ -268,7 +268,7 @@
 static size_t get_atom_name( struct atom_table *table, int atom,
                              WCHAR *str, size_t maxsize, int *count )
 {
-    int len = 0;
+    size_t len = 0;
     struct atom_entry *entry = get_atom_entry( table, atom );
     *count = -1;
     if (entry)
diff --git a/server/mapping.c b/server/mapping.c
index 0ad6a57..ab98a62 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -55,7 +55,7 @@
 /* These are always the same on an i386, and it will be faster this way */
 # define page_mask  0xfff
 # define page_shift 12
-# define init_page_size() /* nothing */
+# define init_page_size() do { /* nothing */ } while(0)
 
 #else  /* __i386__ */
 
diff --git a/server/request.c b/server/request.c
index 8865604..083c601 100644
--- a/server/request.c
+++ b/server/request.c
@@ -72,7 +72,7 @@
 
 
 struct thread *current = NULL;  /* thread handling the current request */
-int global_error = 0;  /* global error code for when no thread is current */
+unsigned int global_error = 0;  /* global error code for when no thread is current */
 
 static struct master_socket *master_socket;  /* the master socket object */
 
diff --git a/server/thread.h b/server/thread.h
index f0f170b..c0db481 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -47,7 +47,7 @@
     struct thread_wait *wait;        /* current wait condition if sleeping */
     struct thread_apc  *apc_head;    /* queue of async procedure calls */
     struct thread_apc  *apc_tail;    /* queue of async procedure calls */
-    int                 error;     /* current error code */
+    unsigned int        error;       /* current error code */
     int                 pass_fd;   /* fd to pass to the client */
     enum run_state      state;     /* running state */
     int                 attached;  /* is thread attached with ptrace? */
@@ -108,10 +108,10 @@
 extern int write_thread_int( struct thread *thread, int *addr, int data, unsigned int mask );
 extern void *get_thread_ip( struct thread *thread );
 
-extern int global_error;  /* global error code for when no thread is current */
+extern unsigned int global_error;  /* global error code for when no thread is current */
 
-static inline int get_error(void)       { return current ? current->error : global_error; }
-static inline void set_error( int err ) { global_error = err; if (current) current->error = err; }
+static inline unsigned int get_error(void)       { return current ? current->error : global_error; }
+static inline void set_error( unsigned int err ) { global_error = err; if (current) current->error = err; }
 static inline void clear_error(void)    { set_error(0); }
 
 static inline void *get_thread_id( struct thread *thread ) { return thread; }