Suppress some false-positives reported by valgrind.

This commit is contained in:
Eric Pouech 2006-01-27 16:17:51 +01:00 committed by Alexandre Julliard
parent 6ab9b23526
commit 2e0b5336f6
4 changed files with 11 additions and 1 deletions

View File

@ -742,6 +742,7 @@ inline static void save_context( CONTEXT *context, const SIGCONTEXT *sigcontext,
{ {
struct ntdll_thread_regs * const regs = ntdll_get_thread_regs(); struct ntdll_thread_regs * const regs = ntdll_get_thread_regs();
memset(context, 0, sizeof(*context));
context->ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS; context->ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS;
context->Eax = EAX_sig(sigcontext); context->Eax = EAX_sig(sigcontext);
context->Ebx = EBX_sig(sigcontext); context->Ebx = EBX_sig(sigcontext);

View File

@ -265,7 +265,6 @@ static struct object *create_console_input( struct thread* renderer )
static struct screen_buffer *create_console_output( struct console_input *console_input ) static struct screen_buffer *create_console_output( struct console_input *console_input )
{ {
struct screen_buffer *screen_buffer; struct screen_buffer *screen_buffer;
struct console_renderer_event evt;
int i; int i;
if (!(screen_buffer = alloc_object( &screen_buffer_ops ))) return NULL; if (!(screen_buffer = alloc_object( &screen_buffer_ops ))) return NULL;
@ -302,10 +301,12 @@ static struct screen_buffer *create_console_output( struct console_input *consol
if (!console_input->active) if (!console_input->active)
{ {
struct console_renderer_event evt;
console_input->active = (struct screen_buffer*)grab_object( screen_buffer ); console_input->active = (struct screen_buffer*)grab_object( screen_buffer );
/* generate the initial events */ /* generate the initial events */
evt.event = CONSOLE_RENDERER_ACTIVE_SB_EVENT; evt.event = CONSOLE_RENDERER_ACTIVE_SB_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
console_input_events_append( console_input->evt, &evt ); console_input_events_append( console_input->evt, &evt );
evt.event = CONSOLE_RENDERER_SB_RESIZE_EVENT; evt.event = CONSOLE_RENDERER_SB_RESIZE_EVENT;
@ -351,6 +352,7 @@ int free_console( struct process *process )
/* all processes have terminated... tell the renderer to terminate too */ /* all processes have terminated... tell the renderer to terminate too */
struct console_renderer_event evt; struct console_renderer_event evt;
evt.event = CONSOLE_RENDERER_EXIT_EVENT; evt.event = CONSOLE_RENDERER_EXIT_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
console_input_events_append( console->evt, &evt ); console_input_events_append( console->evt, &evt );
} }
release_object( console ); release_object( console );
@ -600,6 +602,7 @@ static int set_console_input_info( const struct set_console_input_info_request *
if (!(console = console_input_get( req->handle, CONSOLE_WRITE ))) goto error; if (!(console = console_input_get( req->handle, CONSOLE_WRITE ))) goto error;
memset(&evt.u, 0, sizeof(evt.u));
if (req->mask & SET_CONSOLE_INPUT_INFO_ACTIVE_SB) if (req->mask & SET_CONSOLE_INPUT_INFO_ACTIVE_SB)
{ {
struct screen_buffer *screen_buffer; struct screen_buffer *screen_buffer;
@ -739,6 +742,7 @@ static int set_console_output_info( struct screen_buffer *screen_buffer,
{ {
struct console_renderer_event evt; struct console_renderer_event evt;
memset(&evt.u, 0, sizeof(evt.u));
if (req->mask & SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM) if (req->mask & SET_CONSOLE_OUTPUT_INFO_CURSOR_GEOM)
{ {
if (req->cursor_size < 1 || req->cursor_size > 100) if (req->cursor_size < 1 || req->cursor_size > 100)
@ -1067,6 +1071,7 @@ static int write_console_output( struct screen_buffer *screen_buffer, size_t siz
{ {
struct console_renderer_event evt; struct console_renderer_event evt;
evt.event = CONSOLE_RENDERER_UPDATE_EVENT; evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
evt.u.update.top = y + x / screen_buffer->width; evt.u.update.top = y + x / screen_buffer->width;
evt.u.update.bottom = y + (x + i - 1) / screen_buffer->width; evt.u.update.bottom = y + (x + i - 1) / screen_buffer->width;
console_input_events_append( screen_buffer->input->evt, &evt ); console_input_events_append( screen_buffer->input->evt, &evt );
@ -1117,6 +1122,7 @@ static int fill_console_output( struct screen_buffer *screen_buffer, char_info_t
{ {
struct console_renderer_event evt; struct console_renderer_event evt;
evt.event = CONSOLE_RENDERER_UPDATE_EVENT; evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
evt.u.update.top = y; evt.u.update.top = y;
evt.u.update.bottom = (y * screen_buffer->width + x + count - 1) / screen_buffer->width; evt.u.update.bottom = (y * screen_buffer->width + x + count - 1) / screen_buffer->width;
console_input_events_append( screen_buffer->input->evt, &evt ); console_input_events_append( screen_buffer->input->evt, &evt );
@ -1230,6 +1236,7 @@ static void scroll_console_output( obj_handle_t handle, int xsrc, int ysrc, int
/* FIXME: this could be enhanced, by signalling scroll */ /* FIXME: this could be enhanced, by signalling scroll */
evt.event = CONSOLE_RENDERER_UPDATE_EVENT; evt.event = CONSOLE_RENDERER_UPDATE_EVENT;
memset(&evt.u, 0, sizeof(evt.u));
evt.u.update.top = min(ysrc, ydst); evt.u.update.top = min(ysrc, ydst);
evt.u.update.bottom = max(ysrc, ydst) + h - 1; evt.u.update.bottom = max(ysrc, ydst) + h - 1;
console_input_events_append( screen_buffer->input->evt, &evt ); console_input_events_append( screen_buffer->input->evt, &evt );

View File

@ -384,6 +384,7 @@ static inline void set_fd_epoll_events( struct fd *fd, int user, int events )
} }
ev.events = events; ev.events = events;
memset(&ev.data, 0, sizeof(ev.data));
ev.data.u32 = user; ev.data.u32 = user;
if (epoll_ctl( epoll_fd, ctl, fd->unix_fd, &ev ) == -1) if (epoll_ctl( epoll_fd, ctl, fd->unix_fd, &ev ) == -1)

View File

@ -750,6 +750,7 @@ void open_master_socket(void)
} }
/* signal parent */ /* signal parent */
dummy = 0;
write( sync_pipe[1], &dummy, 1 ); write( sync_pipe[1], &dummy, 1 );
close( sync_pipe[1] ); close( sync_pipe[1] );
break; break;