Simplify SDL_assert() calls

SDL_assert() already prevents "unused variable" warnings.
This commit is contained in:
Romain Vimont 2018-08-15 16:46:53 +02:00
parent 4527be4cde
commit 359685b1db
2 changed files with 1 additions and 8 deletions

View file

@ -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);

View file

@ -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);