Skip to content

Commit

Permalink
Fix possibly uninitialized value
Browse files Browse the repository at this point in the history
Due to gotos, "ret" may be returned uninitialized.
  • Loading branch information
rom1v committed Jan 3, 2021
1 parent 192fbd8 commit ed130e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/scrcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ed130e0

Please sign in to comment.