[libsoup] Fix possibly uninitialized warnings



commit fb98e9a8c3062c75357b961543af091de2dd5459
Author: Patrick Griffis <pgriffis igalia com>
Date:   Mon Sep 20 15:41:31 2021 -0500

    Fix possibly uninitialized warnings

 libsoup/websocket/soup-websocket-connection.c | 2 +-
 tests/samesite-test.c                         | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/libsoup/websocket/soup-websocket-connection.c b/libsoup/websocket/soup-websocket-connection.c
index 35efaec4..0f5557e4 100644
--- a/libsoup/websocket/soup-websocket-connection.c
+++ b/libsoup/websocket/soup-websocket-connection.c
@@ -473,7 +473,7 @@ send_message (SoupWebsocketConnection *self,
        GByteArray *bytes;
        gsize frame_len;
        guint8 *outer;
-       guint8 mask_offset;
+       guint8 mask_offset = 0;
        GBytes *filtered_bytes;
        GList *l;
        GError *error = NULL;
diff --git a/tests/samesite-test.c b/tests/samesite-test.c
index 417b8a6f..4b6884d8 100644
--- a/tests/samesite-test.c
+++ b/tests/samesite-test.c
@@ -60,6 +60,9 @@ assert_highest_policy_visible (GSList *cookies, SoupSameSitePolicy policy)
        case SOUP_SAME_SITE_POLICY_NONE:
                expected_count = 1;
                break;
+        default:
+                g_assert_not_reached ();
+                break;
        }
 
        g_assert_cmpuint (size, ==, expected_count);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]