From f9c0f5ac644aef589e88d21daab3c50c2e2cb8ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 17 Aug 2014 06:09:23 +0200 Subject: [PATCH] (Camera/Location stub drivers) Changes (General) Fix some potential uninitialized variables --- camera/nullcamera.c | 2 +- frontend/menu/backend/menu_common_backend.c | 4 +++- location/nulllocation.c | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/camera/nullcamera.c b/camera/nullcamera.c index 8ab9c88676b..722486de640 100644 --- a/camera/nullcamera.c +++ b/camera/nullcamera.c @@ -37,7 +37,7 @@ static void nullcamera_stop(void *data) static bool nullcamera_poll(void *data, retro_camera_frame_raw_framebuffer_t frame_raw_cb, retro_camera_frame_opengl_texture_t frame_gl_cb) { - return false; + return true; } const camera_driver_t camera_null = { diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index b62facc5482..79ccc9db183 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -1553,7 +1553,9 @@ static void menu_parse_and_resolve(unsigned menu_type) for (i = 0; i < list_size; i++) { char fill_buf[PATH_MAX]; - const char *path, *core_path, *core_name = NULL; + const char *path = NULL; + const char *core_path = NULL; + const char *core_name = NULL; content_playlist_get_index(g_extern.history, i, &path, &core_path, &core_name); diff --git a/location/nulllocation.c b/location/nulllocation.c index 719e2c78874..36809a7450e 100644 --- a/location/nulllocation.c +++ b/location/nulllocation.c @@ -44,7 +44,11 @@ static void null_location_stop(void *data) static bool null_location_get_position(void *data, double *latitude, double *longitude, double *horiz_accuracy, double *vert_accuracy) { - return false; + *latitude = 0.0; + *longitude = 0.0; + *horiz_accuracy = 0.0; + *vert_accuracy = 0.0; + return true; } static void null_location_set_interval(void *data, unsigned interval_ms, unsigned interval_distance)