From 56d9d97a38f23b485800cd436162e11963b1900e Mon Sep 17 00:00:00 2001 From: L Pereira Date: Sun, 7 Nov 2021 23:13:00 -0800 Subject: Hack: make ASan happy by moving definition of lginterval to shell These globals are really nasty and one of the reasons I hate looking at the HardInfo code. --- modules/computer.c | 2 +- modules/devices.c | 1 - shell/shell.c | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/computer.c b/modules/computer.c index 0f48d907..e516cd54 100644 --- a/modules/computer.c +++ b/modules/computer.c @@ -116,7 +116,6 @@ static ModuleEntry entries[] = { gchar *module_list = NULL; Computer *computer = NULL; gchar *meminfo = NULL; -gchar *lginterval = NULL; gchar *hi_more_info(gchar * entry) { @@ -370,6 +369,7 @@ gchar *callback_dev(void) gchar *callback_memory_usage() { + extern gchar *lginterval; return g_strdup_printf("[Memory]\n" "%s\n" "[$ShellParam$]\n" diff --git a/modules/devices.c b/modules/devices.c index 1672d550..93063ad4 100644 --- a/modules/devices.c +++ b/modules/devices.c @@ -127,7 +127,6 @@ gchar *input_list = NULL; gboolean storage_no_nvme = FALSE; gchar *storage_list = NULL; gchar *battery_list = NULL; -gchar *lginterval = NULL; /* in dmi_memory.c */ gchar *memory_devices_get_info(); diff --git a/shell/shell.c b/shell/shell.c index 5bc85bff..0993f8f7 100644 --- a/shell/shell.c +++ b/shell/shell.c @@ -68,6 +68,8 @@ static Shell *shell = NULL; static GHashTable *update_tbl = NULL; static GSList *update_sfusrc = NULL; +gchar *lginterval = NULL; + /* * Code :) ******************************************************************** */ -- cgit v1.2.3