From 2c8869044c0faff01c6bb8986346f78f631ceac1 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 7 Mar 2011 19:51:58 +0200 Subject: [PATCH] frontend: fix valgrind errors also fixes pc build --- frontend/linux/in_evdev.c | 3 ++- frontend/main.c | 2 +- frontend/plat_omap.c | 4 ++-- libpcsxcore/new_dynarec/emu_if.c | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/linux/in_evdev.c b/frontend/linux/in_evdev.c index e6bdad15..d863c022 100644 --- a/frontend/linux/in_evdev.c +++ b/frontend/linux/in_evdev.c @@ -585,10 +585,11 @@ static int in_evdev_clean_binds(void *drv_data, int *binds, int *def_binds) in_evdev_t *dev = drv_data; int i, t, ret, offs, count = 0; + memset(keybits, 0, sizeof(keybits)); ret = ioctl(dev->fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits); if (ret == -1) { perror("in_evdev: ioctl failed"); - memset(keybits, 0xff, sizeof(keybits)); /* mark all as good */ + // memset(keybits, 0xff, sizeof(keybits)); /* mark all as good */ } if (dev->abs_lzone != 0) { diff --git a/frontend/main.c b/frontend/main.c index 61f023f0..32b12eaa 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -375,8 +375,8 @@ void OnFile_Exit() { #ifndef MAEMO menu_finish(); #endif - plat_finish(); SysClose(); + plat_finish(); exit(0); } diff --git a/frontend/plat_omap.c b/frontend/plat_omap.c index b479a66b..b0490c77 100644 --- a/frontend/plat_omap.c +++ b/frontend/plat_omap.c @@ -30,8 +30,8 @@ struct vout_fbdev *layer_fb; static int omap_setup_layer_(int fd, int enabled, int x, int y, int w, int h, int first_call) { - struct omapfb_plane_info pi; - struct omapfb_mem_info mi; + struct omapfb_plane_info pi = { 0, }; + struct omapfb_mem_info mi = { 0, }; int ret; ret = ioctl(fd, OMAPFB_QUERY_PLANE, &pi); diff --git a/libpcsxcore/new_dynarec/emu_if.c b/libpcsxcore/new_dynarec/emu_if.c index f337b65e..11ed8431 100644 --- a/libpcsxcore/new_dynarec/emu_if.c +++ b/libpcsxcore/new_dynarec/emu_if.c @@ -270,6 +270,7 @@ void *psxH_ptr; void new_dynarec_init() {} void new_dyna_start() {} void new_dynarec_cleanup() {} +void new_dynarec_clear_full() {} void invalidate_all_pages() {} void invalidate_block(unsigned int block) {} void new_dyna_pcsx_mem_init(void) {} -- 2.39.5