diff options
author | Ernestas Kulik <ernestask@gnome.org> | 2018-10-31 21:52:30 +0100 |
---|---|---|
committer | Ernestas Kulik <ernestask@gnome.org> | 2018-10-31 21:52:30 +0100 |
commit | af87a20dc56f1b1ad4a87534bac5c1ff71ddda71 (patch) | |
tree | a44494ec4d2dc7bbdcb0610a9d31f69a3d58d1c2 | |
parent | 4c2e9da9a904d074b699508a969403d004f321f8 (diff) | |
download | nautilus-af87a20dc56f1b1ad4a87534bac5c1ff71ddda71.tar.gz |
general: Null-initialize auto pointers
It’s not done in some places. After this commit, there still might be
some missing, but this is all I gathered in a short amount of time.
-rw-r--r-- | src/nautilus-file-operations.c | 2 | ||||
-rw-r--r-- | src/nautilus-view-icon-controller.c | 4 | ||||
-rw-r--r-- | src/nautilus-view-icon-item-ui.c | 2 | ||||
-rw-r--r-- | src/nautilus-view-model.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c index f3cf2ca0f..d5379c7db 100644 --- a/src/nautilus-file-operations.c +++ b/src/nautilus-file-operations.c @@ -8000,7 +8000,7 @@ extract_job_on_scanned (AutoarExtractor *extractor, guint64 total_size; ExtractJob *extract_job; GFile *source_file; - g_autofree gchar *basename; + g_autofree gchar *basename = NULL; GFileInfo *fsinfo; guint64 free_size; diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c index 10d075809..f96efbd81 100644 --- a/src/nautilus-view-icon-controller.c +++ b/src/nautilus-view-icon-controller.c @@ -894,8 +894,8 @@ real_add_files (NautilusFilesView *files_view, GList *files) { NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (files_view); - g_autoptr (GQueue) files_queue; - g_autoptr (GQueue) item_models; + g_autoptr (GQueue) files_queue = NULL; + g_autoptr (GQueue) item_models = NULL; files_queue = convert_glist_to_queue (files); item_models = convert_files_to_item_models (self, files_queue); diff --git a/src/nautilus-view-icon-item-ui.c b/src/nautilus-view-icon-item-ui.c index 4d0bb81cb..805c68f89 100644 --- a/src/nautilus-view-icon-item-ui.c +++ b/src/nautilus-view-icon-item-ui.c @@ -28,7 +28,7 @@ static GtkWidget * create_icon (NautilusViewIconItemUi *self) { NautilusFileIconFlags flags; - g_autoptr (GdkPixbuf) icon_pixbuf; + g_autoptr (GdkPixbuf) icon_pixbuf = NULL; GtkImage *icon; GtkBox *fixed_height_box; GtkStyleContext *style_context; diff --git a/src/nautilus-view-model.c b/src/nautilus-view-model.c index 08c073b78..12db63a30 100644 --- a/src/nautilus-view-model.c +++ b/src/nautilus-view-model.c @@ -186,8 +186,8 @@ nautilus_view_model_get_items_from_files (NautilusViewModel *self, while ((item_model = g_list_model_get_item (G_LIST_MODEL (self->internal_model), i))) { NautilusFile *file2; - g_autofree gchar *file1_uri; - g_autofree gchar *file2_uri; + g_autofree gchar *file1_uri = NULL; + g_autofree gchar *file2_uri = NULL; file2 = nautilus_view_item_model_get_file (item_model); file1_uri = nautilus_file_get_uri (file1); |