diff options
author | Ondrej Holy <oholy@redhat.com> | 2020-12-21 12:45:56 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2020-12-21 12:45:56 +0100 |
commit | df2354c65b3f43978ad3a3d3afc05a221367d776 (patch) | |
tree | d0e486b5624a3b620fdfda83657d4adc2b8a6e83 | |
parent | 5b0301b0d65fb30513c63b4511cc207b4f64c602 (diff) | |
download | nautilus-wip/oholy/initialize-autofree.tar.gz |
search-engine-tracker: Explicitly initialize g_autofree variablewip/oholy/initialize-autofree
The filtered_search_text variable is not explicitly initialized
although it is mandatory when g_autofree is used. Consequently, the
following warning is shown: "warning: ‘filtered_search_text’ may be
used uninitialized in this function". Let's explicitly initialize the
variable to get rid of that warning.
-rw-r--r-- | src/nautilus-search-engine-tracker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c index 9ebac0b28..a4ec78758 100644 --- a/src/nautilus-search-engine-tracker.c +++ b/src/nautilus-search-engine-tracker.c @@ -396,7 +396,7 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider) if (tracker->fts_enabled && *search_text) { /* Use fts:match only for content search to not lose some filename results due to stop words. */ - g_autofree gchar *filtered_search_text; + g_autofree gchar *filtered_search_text = NULL; filtered_search_text = filter_alnum_strdup (search_text); g_string_append_printf (sparql, |