[glade] Fix maybe uninitialized warnings
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Fix maybe uninitialized warnings
- Date: Fri, 16 Oct 2020 21:26:23 +0000 (UTC)
commit 81f96c2fb14159c2fad5ecc149bf978fddbb9c06
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Fri Oct 16 18:22:10 2020 -0300
Fix maybe uninitialized warnings
gladeui/glade-catalog.c | 2 +-
src/glade-http.c | 2 +-
src/glade-registration.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gladeui/glade-catalog.c b/gladeui/glade-catalog.c
index 6c0b95ba..bfd7e2b6 100644
--- a/gladeui/glade-catalog.c
+++ b/gladeui/glade-catalog.c
@@ -769,7 +769,7 @@ glade_catalog_load_all (void)
/* First load catalogs from user specified directories ... */
if ((search_path = g_getenv (GLADE_ENV_CATALOG_PATH)) != NULL)
{
- g_auto(GStrv) split;
+ g_auto(GStrv) split = NULL;
if ((split = g_strsplit (search_path, ":", 0)) != NULL)
{
diff --git a/src/glade-http.c b/src/glade-http.c
index 457ef977..d6c08c9c 100644
--- a/src/glade-http.c
+++ b/src/glade-http.c
@@ -158,7 +158,7 @@ on_read_line_ready (GObject *source, GAsyncResult *res, gpointer data)
{
GladeHTTPPrivate *priv = GLADE_HTTP (data)->priv;
g_autoptr (GError) error = NULL;
- g_autofree gchar *line;
+ g_autofree gchar *line = NULL;
gsize length;
glade_http_emit_status (data, GLADE_HTTP_RECEIVING, NULL);
diff --git a/src/glade-registration.c b/src/glade-registration.c
index 2f5b55a4..ec8d5de0 100644
--- a/src/glade-registration.c
+++ b/src/glade-registration.c
@@ -195,7 +195,7 @@ glade_registration_show_message (GladeRegistration *registration,
if (format)
{
- g_autofree gchar *string;
+ g_autofree gchar *string = NULL;
va_list args;
va_start (args, format);
@@ -545,7 +545,7 @@ glade_registration_save_state_foreach (GtkWidget *widget, gpointer data)
{
GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
GtkTextIter start, end;
- g_autofree gchar *text;
+ g_autofree gchar *text = NULL;
gtk_text_buffer_get_bounds (buffer, &start, &end);
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]