From f83f0b2d4484c351cbeb2355f6d11bc530d74439 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Jun 2020 20:27:34 +0200 Subject: [PATCH] Fix static code analysis warnings --- gfx/drivers_shader/slang_process.cpp | 1 + network/netplay/netplay_discovery.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_shader/slang_process.cpp b/gfx/drivers_shader/slang_process.cpp index 8a2b18a00f..600fb07eb8 100644 --- a/gfx/drivers_shader/slang_process.cpp +++ b/gfx/drivers_shader/slang_process.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "glslang_util.h" #include "slang_reflection.h" diff --git a/network/netplay/netplay_discovery.c b/network/netplay/netplay_discovery.c index 878a634539..aba8f4abc1 100644 --- a/network/netplay/netplay_discovery.c +++ b/network/netplay/netplay_discovery.c @@ -418,14 +418,19 @@ static int16_t htons_for_morons(int16_t value) static bool netplay_lan_ad_client(void) { + unsigned i; fd_set fds; socklen_t addr_size; struct sockaddr their_addr; - struct timeval tmp_tv = {0}; + struct timeval tmp_tv = {0}; if (lan_ad_client_fd < 0) return false; + their_addr.sa_family = 0; + for (i = 0; i < 14; i++) + their_addr.sa_data[i] = 0; + /* Check for any ad queries */ for (;;) {