From aa3ac5ba573fa1dac8dec7b844d130355e49821c Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Mon, 11 Mar 2024 23:26:34 +0100 Subject: FIX GCC warnings - include & uninit free (Potential Crash - never seen) --- hardinfo2/util.c | 2 +- shell/callbacks.c | 2 ++ shell/syncmanager.c | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hardinfo2/util.c b/hardinfo2/util.c index cbabcc53..86f2a4d2 100644 --- a/hardinfo2/util.c +++ b/hardinfo2/util.c @@ -90,7 +90,7 @@ gchar *seconds_to_string(unsigned int seconds) { unsigned int hours, minutes, days; const gchar *days_fmt, *hours_fmt, *minutes_fmt, *seconds_fmt; - gchar *full_fmt, *ret = g_strdup(""); + gchar *full_fmt=NULL, *ret = g_strdup(""); minutes = seconds / 60; seconds %= 60; diff --git a/shell/callbacks.c b/shell/callbacks.c index c60487d9..89fe4e32 100644 --- a/shell/callbacks.c +++ b/shell/callbacks.c @@ -18,6 +18,8 @@ #include #include +#include +#include #include "hardinfo.h" #include "callbacks.h" diff --git a/shell/syncmanager.c b/shell/syncmanager.c index 4608eb7d..ad2c119a 100644 --- a/shell/syncmanager.c +++ b/shell/syncmanager.c @@ -23,6 +23,9 @@ #include +#include +#include + #include #include #include -- cgit v1.2.3