From 6fc94ac462f51212ceecd8d8103645f7c6582fb5 Mon Sep 17 00:00:00 2001 From: Alexis La Goutte Date: Tue, 9 Feb 2021 20:31:44 +0000 Subject: [PATCH] extcap: Fix Dead Store found by Clang Analyzer extcap.c:876:26: warning: Although the value stored to 'pref' is used in the enclosing expression, the value is never actually read from 'pref' --- extcap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extcap.c b/extcap.c index 21c1b14b0c..485e09a3fa 100644 --- a/extcap.c +++ b/extcap.c @@ -866,14 +866,12 @@ static gboolean cb_preference(extcap_callback_info_t cb_info) if (arg->save) { - struct preference *pref = NULL; - gchar *pref_name = g_regex_replace(regex_name, arg->call, strlen(arg->call), 0, "", (GRegexMatchFlags) 0, NULL); gchar *ifname_underscore = g_regex_replace(regex_ifname, cb_info.ifname, strlen(cb_info.ifname), 0, "_", (GRegexMatchFlags) 0, NULL); gchar *ifname_lowercase = g_ascii_strdown(ifname_underscore, -1); gchar *pref_ifname = g_strconcat(ifname_lowercase, ".", pref_name, NULL); - if ((pref = prefs_find_preference(dev_module, pref_ifname)) == NULL) + if (prefs_find_preference(dev_module, pref_ifname) == NULL) { char *pref_name_for_prefs; char *pref_title = wmem_strdup(wmem_epan_scope(), arg->display);