[monitoring-plugins] Fixes for -Wuninitialized

RincewindsHat git at monitoring-plugins.org
Mon Jul 10 10:30:12 CEST 2023


 Module: monitoring-plugins
 Branch: master
 Commit: ab62b2ce5da5adbbfcbb63922b06695a7b94e997
 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
   Date: Sun Mar 12 19:31:45 2023 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ab62b2c

Fixes for -Wuninitialized

---

 plugins-root/check_icmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index edfd694..f96207b 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -1432,6 +1432,7 @@ get_ip_address(const char *ifname)
 {
   // TODO: Rewrite this so the function return an error and we exit somewhere else
 	struct sockaddr_in ip;
+	ip.sin_addr.s_addr = 0; // Fake inititialization to make compiler happy
 #if defined(SIOCGIFADDR)
 	struct ifreq ifr;
 



More information about the Commits mailing list