From ed130e05d55615d6014d93f15cfcb92ad62b01d8 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 3 Jan 2021 22:40:33 +0100 Subject: [PATCH] Fix possibly uninitialized value Due to gotos, "ret" may be returned uninitialized. --- app/src/scrcpy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index 4c502ff683..3d043b9509 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -308,6 +308,8 @@ scrcpy(const struct scrcpy_options *options) { return false; } + bool ret = false; + bool server_started = false; bool fps_counter_initialized = false; bool video_buffer_initialized = false; @@ -449,7 +451,7 @@ scrcpy(const struct scrcpy_options *options) { input_manager_init(&input_manager, options); - bool ret = event_loop(options); + ret = event_loop(options); LOGD("quit..."); screen_destroy(&screen);