[glib: 8/9] glocalfileinfo: Remove a redundant store
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 8/9] glocalfileinfo: Remove a redundant store
- Date: Thu, 28 Apr 2022 11:07:36 +0000 (UTC)
commit a17a27bcf11020f7c67925ca12eb6ea22827dea0
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Apr 28 11:20:11 2022 +0100
glocalfileinfo: Remove a redundant store
This fixes a scan-build warning:
```
../../../../source/glib/gio/glocalfileinfo.c:1661:28: warning: Although the value stored to 'mydirname'
is used in the enclosing expression, the value is never actually read from 'mydirname' [deadcode.DeadStores]
mydirname = g_strdup (dirname),
^ ~~~~~~~~~~~~~~~~~~
```
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1767
gio/glocalfileinfo.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 80b44ed904..8c047eca3b 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1651,14 +1651,12 @@ file_is_hidden (const gchar *path,
if (!g_hash_table_lookup_extended (hidden_cache, dirname,
NULL, (gpointer *) &data))
{
- gchar *mydirname;
-
data = g_new0 (HiddenCacheData, 1);
data->hidden_files = table = read_hidden_file (dirname);
data->timestamp_secs = g_get_monotonic_time () / G_USEC_PER_SEC;
g_hash_table_insert (hidden_cache,
- mydirname = g_strdup (dirname),
+ g_strdup (dirname),
data);
if (!hidden_cache_source)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]