[glib: 3/4] gsequence: Fix variable maybe uninitialized warning
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/4] gsequence: Fix variable maybe uninitialized warning
- Date: Tue, 25 Jan 2022 19:45:03 +0000 (UTC)
commit 6406217f50c6962eefb4a6693877fede45504155
Author: Pablo Correa Gómez <ablocorrea hotmail com>
Date: Tue Jan 18 16:56:36 2022 +0100
gsequence: Fix variable maybe uninitialized warning
../glib/gsequence.c: In function 'g_sequence_move_range':
../glib/gsequence.c:640:24: warning:
'dest_seq' may be used uninitialized in this function [-Wmaybe-uninitialized]
640 | if (dest && dest_seq == src_seq &&
| ~~~~~~~~~^~~~~~~~~~
glib/gsequence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gsequence.c b/glib/gsequence.c
index 2b443fe5b..9cf1e8d3e 100644
--- a/glib/gsequence.c
+++ b/glib/gsequence.c
@@ -608,7 +608,7 @@ g_sequence_move_range (GSequenceIter *dest,
GSequenceIter *begin,
GSequenceIter *end)
{
- GSequence *src_seq, *end_seq, *dest_seq;
+ GSequence *src_seq, *end_seq, *dest_seq = NULL;
GSequenceNode *first;
g_return_if_fail (begin != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]