[recipes] Fix unused variable warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Fix unused variable warnings
- Date: Tue, 28 Feb 2017 20:59:45 +0000 (UTC)
commit 37f661c2095a7543538aa2ea5f7e0f58b548f74c
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 28 15:36:00 2017 -0500
Fix unused variable warnings
clang is much better about this than gcc.
src/gr-account.c | 2 --
src/gr-edit-page.c | 1 -
src/gr-recipe-exporter.c | 3 ---
src/gr-recipe-importer.c | 4 ----
src/gr-recipe-store.c | 2 --
src/gr-recipes-page.c | 1 -
src/gr-shopping-list-printer.c | 3 ---
src/gr-shopping-page.c | 1 -
8 files changed, 0 insertions(+), 17 deletions(-)
---
diff --git a/src/gr-account.c b/src/gr-account.c
index 3c4fa3b..207d989 100644
--- a/src/gr-account.c
+++ b/src/gr-account.c
@@ -126,8 +126,6 @@ window_handle_exported (GtkWindow *window,
const char *handle;
GVariantBuilder opt_builder;
- g_autoptr(GDBusConnection) bus = NULL;
-
cbdata->connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_variant_builder_init (&opt_builder, G_VARIANT_TYPE ("a{sv}"));
diff --git a/src/gr-edit-page.c b/src/gr-edit-page.c
index 8cf87f2..eaed05e 100644
--- a/src/gr-edit-page.c
+++ b/src/gr-edit-page.c
@@ -280,7 +280,6 @@ rewrite_instructions_for_removed_image (const char *instructions,
int seconds;
int minutes;
int hours;
- g_autofree char *str = NULL;
seconds = (int)(step->timer / G_TIME_SPAN_SECOND);
minutes = seconds / 60;
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index a8e19f4..6b96ce1 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -124,7 +124,6 @@ completed_cb (AutoarCompressor *compressor,
GrRecipeExporter *exporter)
{
g_autofree char *path = NULL;
- g_autoptr(GError) error = NULL;
const char *address;
const char *subject;
g_autofree char *body = NULL;
@@ -208,7 +207,6 @@ export_one_recipe (GrRecipeExporter *exporter,
GrDiets diets;
GDateTime *ctime;
GDateTime *mtime;
- g_autoptr(GrChef) chef = NULL;
g_autoptr(GArray) images = NULL;
g_auto(GStrv) paths = NULL;
int i;
@@ -641,7 +639,6 @@ show_export_dialog (GrRecipeExporter *exporter)
g_autoptr(GtkBuilder) builder = NULL;
GtkWidget *dialog;
GtkWidget *list;
- g_autofree char *tmp = NULL;
builder = gtk_builder_new_from_resource ("/org/gnome/Recipes/recipe-export-dialog.ui");
dialog = GTK_WIDGET (gtk_builder_get_object (builder, "dialog"));
diff --git a/src/gr-recipe-importer.c b/src/gr-recipe-importer.c
index 44ea301..1265ae8 100644
--- a/src/gr-recipe-importer.c
+++ b/src/gr-recipe-importer.c
@@ -507,8 +507,6 @@ import_recipes (GrRecipeImporter *importer)
{
g_autoptr(GKeyFile) keyfile = NULL;
g_autofree char *path = NULL;
- g_auto(GStrv) groups = NULL;
- g_autoptr(GrChef) chef = NULL;
g_autoptr(GError) error = NULL;
g_assert (importer->recipes_keyfile == NULL);
@@ -745,8 +743,6 @@ import_chefs (GrRecipeImporter *importer)
{
g_autoptr(GKeyFile) keyfile = NULL;
g_autofree char *path = NULL;
- g_auto(GStrv) groups = NULL;
- g_autoptr(GrChef) chef = NULL;
g_autoptr(GError) error = NULL;
g_assert (importer->chefs_keyfile == NULL);
diff --git a/src/gr-recipe-store.c b/src/gr-recipe-store.c
index 699f6a5..ba6b65e 100644
--- a/src/gr-recipe-store.c
+++ b/src/gr-recipe-store.c
@@ -146,7 +146,6 @@ load_recipes (GrRecipeStore *self,
g_autofree char *ingredients = NULL;
g_autofree char *instructions = NULL;
g_autofree char *notes = NULL;
- g_autofree char *image_path = NULL;
g_auto(GStrv) paths = NULL;
int serves;
int spiciness;
@@ -960,7 +959,6 @@ gr_recipe_store_init (GrRecipeStore *self)
const char *old_dir;
g_autofree char *current_dir = NULL;
g_autofree char *uninstalled_dir = NULL;
- g_autoptr(GError) error = NULL;
self->recipes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
self->chefs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
diff --git a/src/gr-recipes-page.c b/src/gr-recipes-page.c
index ad58ed9..ad33241 100644
--- a/src/gr-recipes-page.c
+++ b/src/gr-recipes-page.c
@@ -359,7 +359,6 @@ populate_shopping_from_store (GrRecipesPage *self)
g_autofree char *shop1 = NULL;
g_autofree char *shop2 = NULL;
char *tmp;
- g_autoptr(GDateTime) now = NULL;
store = gr_app_get_recipe_store (GR_APP (g_application_get_default ()));
diff --git a/src/gr-shopping-list-printer.c b/src/gr-shopping-list-printer.c
index 95878a1..0734650 100644
--- a/src/gr-shopping-list-printer.c
+++ b/src/gr-shopping-list-printer.c
@@ -113,11 +113,8 @@ begin_print (GtkPrintOperation *operation,
double page_height;
GList *page_breaks;
g_autoptr(GString) s = NULL;
- g_autoptr(GArray) images = NULL;
int num_lines;
int line;
- g_autofree char **segs = NULL;
- g_auto(GStrv) ings = NULL;
GList *l;
height = gtk_print_context_get_height (context);
diff --git a/src/gr-shopping-page.c b/src/gr-shopping-page.c
index e371ac5..d4ffce2 100644
--- a/src/gr-shopping-page.c
+++ b/src/gr-shopping-page.c
@@ -679,7 +679,6 @@ share_list (GrShoppingPage *page)
{
GList *recipes, *items;
g_autofree char *text = NULL;
- g_autoptr(GError) error = NULL;
GtkWidget *window;
recipes = get_recipes (page);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]