From cf7414c7356ae21f6f99708e79048458bb1da216 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 27 May 2018 15:46:07 +0200 Subject: [PATCH] Fix proc_show_touches warning In practice, proc_show_touches may not be used uninitialized, since it checks the flag options->show_touches, but the compiler can't know that, so initialize it to avoid the warning. --- app/src/scrcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index fc97e3b2..57df8401 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -125,7 +125,7 @@ SDL_bool scrcpy(const struct scrcpy_options *options) { return SDL_FALSE; } - process_t proc_show_touches; + process_t proc_show_touches = NULL; SDL_bool show_touches_waited; if (options->show_touches) { LOGI("Enable show_touches");