From 1782290842b521f524406c6a2363b40aac06bd9d Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 28 Nov 2023 17:03:34 +0100 Subject: [PATCH] Fix possibly uninitialized variable (found by CPPcheck/Sonarqube) --- devIocStats/os/Linux/osdMemUsage.c | 2 +- devIocStats/os/cygwin32/osdMemUsage.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devIocStats/os/Linux/osdMemUsage.c b/devIocStats/os/Linux/osdMemUsage.c index 82f8cb7..44957d7 100644 --- a/devIocStats/os/Linux/osdMemUsage.c +++ b/devIocStats/os/Linux/osdMemUsage.c @@ -38,7 +38,7 @@ int devIocStatsInitMemUsage(void) { int devIocStatsGetMemUsage(memInfo *pval) { static char statmfile[] = "/proc/self/statm"; static char memfile[] = "/proc/meminfo"; - unsigned long size, resident, value, total = 0, memfree = 0; + unsigned long size, resident = 0, value, total = 0, memfree = 0; char title[32] = ""; char units[32] = ""; int ret = 0; diff --git a/devIocStats/os/cygwin32/osdMemUsage.c b/devIocStats/os/cygwin32/osdMemUsage.c index 82f8cb7..44957d7 100644 --- a/devIocStats/os/cygwin32/osdMemUsage.c +++ b/devIocStats/os/cygwin32/osdMemUsage.c @@ -38,7 +38,7 @@ int devIocStatsInitMemUsage(void) { int devIocStatsGetMemUsage(memInfo *pval) { static char statmfile[] = "/proc/self/statm"; static char memfile[] = "/proc/meminfo"; - unsigned long size, resident, value, total = 0, memfree = 0; + unsigned long size, resident = 0, value, total = 0, memfree = 0; char title[32] = ""; char units[32] = ""; int ret = 0;