Commit b3332d74 authored by Alexandre Julliard's avatar Alexandre Julliard

Converted the server to -DSTRICT.

parent 8417027c
DEFS = -D__WINE__ -DWINE_NO_STRICT
DEFS = -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
......
......@@ -386,7 +386,7 @@ static void startup_info_dump( struct object *obj, int verbose )
struct startup_info *info = (struct startup_info *)obj;
assert( obj->ops == &startup_info_ops );
fprintf( stderr, "Startup info flags=%x in=%d out=%d err=%d\n",
fprintf( stderr, "Startup info flags=%x in=%p out=%p err=%p\n",
info->create_flags, info->hstdin, info->hstdout, info->hstderr );
}
......
......@@ -608,7 +608,7 @@ static void msg_queue_destroy( struct object *obj )
static void thread_input_dump( struct object *obj, int verbose )
{
struct thread_input *input = (struct thread_input *)obj;
fprintf( stderr, "Thread input focus=%x capture=%x active=%x\n",
fprintf( stderr, "Thread input focus=%p capture=%p active=%p\n",
input->focus, input->capture, input->active );
}
......
......@@ -384,7 +384,7 @@ int send_client_fd( struct process *process, int fd, obj_handle_t handle )
int ret;
if (debug_level)
fprintf( stderr, "%08x: *fd* %d -> %d\n", (unsigned int)current, handle, fd );
fprintf( stderr, "%08x: *fd* %p -> %d\n", (unsigned int)current, handle, fd );
#ifdef HAVE_MSGHDR_ACCRIGHTS
msghdr.msg_accrightslen = sizeof(fd);
......
......@@ -253,7 +253,7 @@ static void sock_wake_up( struct sock *sock, int pollev )
}
if (sock->window)
{
if (debug_level) fprintf(stderr, "signalling events %x win %x\n", events, sock->window );
if (debug_level) fprintf(stderr, "signalling events %x win %p\n", events, sock->window );
for (i = 0; i < FD_MAX_EVENTS; i++)
{
int event = event_bitorder[i];
......
......@@ -35,17 +35,18 @@ static int allocated_handles;
static struct user_handle *handle_to_entry( user_handle_t handle )
{
int index = (handle & 0xffff) - FIRST_USER_HANDLE;
int index = ((unsigned int)handle & 0xffff) - FIRST_USER_HANDLE;
if (index < 0 || index >= nb_handles) return NULL;
if (!handles[index].type) return NULL;
if ((handle >> 16) && (handle >> 16 != handles[index].generation)) return NULL;
if (((unsigned int)handle >> 16) && ((unsigned int)handle >> 16 != handles[index].generation))
return NULL;
return &handles[index];
}
inline static user_handle_t entry_to_handle( struct user_handle *ptr )
{
int index = ptr - handles;
return (index + FIRST_USER_HANDLE) + (ptr->generation << 16);
return (user_handle_t)((index + FIRST_USER_HANDLE) + (ptr->generation << 16));
}
inline static struct user_handle *alloc_user_entry(void)
......@@ -110,7 +111,7 @@ user_handle_t get_user_full_handle( user_handle_t handle )
{
struct user_handle *entry;
if (handle >> 16) return handle;
if ((unsigned int)handle >> 16) return handle;
if (!(entry = handle_to_entry( handle ))) return handle;
return entry_to_handle( entry );
}
......@@ -146,7 +147,7 @@ void *next_user_handle( user_handle_t *handle, enum user_object type )
if (!*handle) entry = handles;
else
{
int index = (*handle & 0xffff) - FIRST_USER_HANDLE;
int index = ((unsigned int)*handle & 0xffff) - FIRST_USER_HANDLE;
if (index < 0 || index >= nb_handles) return NULL;
entry = handles + index + 1; /* start from the next one */
}
......
......@@ -31,9 +31,9 @@
"void*" => "%p",
"time_t" => "%ld",
"size_t" => "%d",
"obj_handle_t" => "%d",
"obj_handle_t" => "%p",
"atom_t" => "%04x",
"user_handle_t" => "%08x",
"user_handle_t" => "%p",
"process_id_t" => "%08x",
"thread_id_t" => "%08x",
"rectangle_t" => "&dump_rectangle",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment