From 359685b1db8f355a6d7ade3a99989b03558ff907 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 15 Aug 2018 16:46:53 +0200 Subject: [PATCH] Simplify SDL_assert() calls SDL_assert() already prevents "unused variable" warnings. --- app/src/controller.c | 4 ---- app/src/file_handler.c | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/app/src/controller.c b/app/src/controller.c index f698ebc8..d4919c56 100644 --- a/app/src/controller.c +++ b/app/src/controller.c @@ -67,12 +67,8 @@ static int run_controller(void *data) { break; } struct control_event event; -#ifdef BUILD_DEBUG SDL_bool non_empty = control_event_queue_take(&controller->queue, &event); SDL_assert(non_empty); -#else - control_event_queue_take(&controller->queue, &event); -#endif mutex_unlock(controller->mutex); SDL_bool ok = process_event(controller, &event); diff --git a/app/src/file_handler.c b/app/src/file_handler.c index f47372c1..bf68b0f8 100644 --- a/app/src/file_handler.c +++ b/app/src/file_handler.c @@ -167,12 +167,9 @@ static int run_file_handler(void *data) { break; } struct request *req; -#ifdef BUILD_DEBUG SDL_bool non_empty = request_queue_take(&file_handler->queue, &req); SDL_assert(non_empty); -#else - request_queue_take(&file_handler->queue, &req); -#endif + process_t process; if (req->action == ACTION_INSTALL_APK) { LOGI("Installing %s...", req->file);