[glib: 1/6] ghash: Move initialisation to declaration
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/6] ghash: Move initialisation to declaration
- Date: Mon, 19 Oct 2020 10:26:23 +0000 (UTC)
commit 271db1f409fa8452281a309b39242e0db35c4885
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Oct 14 12:58:25 2020 +0100
ghash: Move initialisation to declaration
This introduces no functional changes, but should squash a warning from
`scan-build`:
```
../../../glib/ghash.c:575:3: warning: Value stored to 'small' is never read
small = FALSE;
```
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/ghash.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/glib/ghash.c b/glib/ghash.c
index 40a0fb2ca..f3ed0f3b9 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -565,13 +565,12 @@ g_hash_table_remove_node (GHashTable *hash_table,
static void
g_hash_table_setup_storage (GHashTable *hash_table)
{
- gboolean small;
+ gboolean small = FALSE;
/* We want to use small arrays only if:
* - we are running on a system where that makes sense (64 bit); and
* - we are not running under valgrind.
*/
- small = FALSE;
#ifdef USE_SMALL_ARRAYS
small = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]