[gnome-builder] build: squash warnings in optimized builds
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: squash warnings in optimized builds
- Date: Thu, 14 May 2015 20:45:17 +0000 (UTC)
commit 328481f72a48a8fd5f0a4aeb91a0bdc6907302fa
Author: Christian Hergert <christian hergert me>
Date: Thu May 14 13:30:46 2015 -0700
build: squash warnings in optimized builds
libide/autotools/ide-makecache.c | 3 +--
libide/clang/ide-clang-highlighter.c | 3 +--
libide/clang/ide-clang-service.c | 3 +--
libide/git/ide-git-remote-callbacks.c | 4 ++--
libide/ide-context.c | 5 ++---
libide/ide-source-map.c | 7 ++-----
libide/ide-vcs-uri.c | 5 -----
src/devhelp/gb-devhelp-view.c | 3 +--
src/greeter/gb-greeter-window.c | 3 +--
src/preferences/gb-preferences-window.c | 3 +--
src/project-tree/gb-project-tree-builder.c | 6 ++----
src/views/gb-view-stack-actions.c | 22 ----------------------
12 files changed, 14 insertions(+), 53 deletions(-)
---
diff --git a/libide/autotools/ide-makecache.c b/libide/autotools/ide-makecache.c
index 3ff205e..43e2994 100644
--- a/libide/autotools/ide-makecache.c
+++ b/libide/autotools/ide-makecache.c
@@ -920,13 +920,12 @@ ide_makecache_get_file_flags_worker (GTask *task,
GCancellable *cancellable)
{
FileFlagsLookup *lookup = task_data;
- EggTaskCache *cache = source_object;
gsize i;
gsize j;
IDE_ENTRY;
- g_assert (EGG_IS_TASK_CACHE (cache));
+ g_assert (EGG_IS_TASK_CACHE (source_object));
g_assert (G_IS_TASK (task));
g_assert (lookup != NULL);
g_assert (lookup->relative_path != NULL);
diff --git a/libide/clang/ide-clang-highlighter.c b/libide/clang/ide-clang-highlighter.c
index efa993a..03206ea 100644
--- a/libide/clang/ide-clang-highlighter.c
+++ b/libide/clang/ide-clang-highlighter.c
@@ -65,7 +65,6 @@ ide_clang_highlighter_real_update (IdeHighlighter *highlighter,
const GtkTextIter *range_end,
GtkTextIter *location)
{
- IdeClangHighlighter *self = (IdeClangHighlighter *)highlighter;
g_autoptr(IdeClangTranslationUnit) unit = NULL;
GtkTextBuffer *text_buffer;
GtkSourceBuffer *source_buffer;
@@ -77,7 +76,7 @@ ide_clang_highlighter_real_update (IdeHighlighter *highlighter,
GtkTextIter begin;
GtkTextIter end;
- g_assert (IDE_IS_CLANG_HIGHLIGHTER (self));
+ g_assert (IDE_IS_CLANG_HIGHLIGHTER (highlighter));
g_assert (callback != NULL);
g_assert (range_begin != NULL);
g_assert (range_end != NULL);
diff --git a/libide/clang/ide-clang-service.c b/libide/clang/ide-clang-service.c
index c53a251..b6c035e 100644
--- a/libide/clang/ide-clang-service.c
+++ b/libide/clang/ide-clang-service.c
@@ -347,12 +347,11 @@ ide_clang_service_unit_completed_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
- IdeClangService *self = (IdeClangService *)object;
g_autoptr(GTask) task = user_data;
gpointer ret;
GError *error = NULL;
- g_assert (IDE_IS_CLANG_SERVICE (self));
+ g_assert (IDE_IS_CLANG_SERVICE (object));
g_assert (G_IS_TASK (result));
g_assert (G_IS_TASK (task));
diff --git a/libide/git/ide-git-remote-callbacks.c b/libide/git/ide-git-remote-callbacks.c
index 07246be..682c468 100644
--- a/libide/git/ide-git-remote-callbacks.c
+++ b/libide/git/ide-git-remote-callbacks.c
@@ -143,12 +143,12 @@ ide_git_remote_callbacks_real_credentials (GgitRemoteCallbacks *callbacks,
GgitCredtype allowed_types,
GError **error)
{
- IdeGitRemoteCallbacks *self = (IdeGitRemoteCallbacks *)callbacks;
GgitCred *ret = NULL;
IDE_ENTRY;
- g_assert (IDE_IS_GIT_REMOTE_CALLBACKS (self));
+ g_assert (IDE_IS_GIT_REMOTE_CALLBACKS (callbacks));
+ g_assert (url != NULL);
IDE_TRACE_MSG ("username=%s url=%s", username_from_url ?: "", url);
diff --git a/libide/ide-context.c b/libide/ide-context.c
index 54638c1..2920441 100644
--- a/libide/ide-context.c
+++ b/libide/ide-context.c
@@ -893,7 +893,7 @@ ide_context_init_project_name (gpointer source_object,
g_return_if_fail (IDE_IS_CONTEXT (self));
- task = g_task_new (source_object, cancellable, callback, user_data);
+ task = g_task_new (self, cancellable, callback, user_data);
g_task_run_in_thread (task, ide_context_load_doap_worker);
}
@@ -1646,12 +1646,11 @@ ide_context_unload_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
{
- IdeContext *self = (IdeContext *)object;
GTask *unload_task = (GTask *)result;
g_autoptr(GTask) task = user_data;
GError *error = NULL;
- g_assert (IDE_IS_CONTEXT (self));
+ g_assert (IDE_IS_CONTEXT (object));
g_assert (G_IS_TASK (task));
if (!g_task_propagate_boolean (unload_task, &error))
diff --git a/libide/ide-source-map.c b/libide/ide-source-map.c
index 6885a25..79aaa08 100644
--- a/libide/ide-source-map.c
+++ b/libide/ide-source-map.c
@@ -654,10 +654,9 @@ ide_source_map__child_view_state_flags_changed (GtkWidget *widget,
GtkStateFlags flags,
GtkWidget *child_view)
{
- IdeSourceMap *self = (IdeSourceMap *)widget;
GdkWindow *window;
- g_assert (IDE_IS_SOURCE_MAP (self));
+ g_assert (IDE_IS_SOURCE_MAP (widget));
g_assert (GTK_SOURCE_IS_VIEW (child_view));
window = gtk_text_view_get_window (GTK_TEXT_VIEW (child_view), GTK_TEXT_WINDOW_TEXT);
@@ -669,9 +668,7 @@ static void
ide_source_map__child_view_realize_after (GtkWidget *widget,
GtkWidget *child_view)
{
- IdeSourceMap *self = (IdeSourceMap *)widget;
-
- g_assert (IDE_IS_SOURCE_MAP (self));
+ g_assert (IDE_IS_SOURCE_MAP (widget));
g_assert (GTK_SOURCE_IS_VIEW (child_view));
ide_source_map__child_view_state_flags_changed (widget, 0, child_view);
diff --git a/libide/ide-vcs-uri.c b/libide/ide-vcs-uri.c
index 7833bc4..dd6f1c0 100644
--- a/libide/ide-vcs-uri.c
+++ b/libide/ide-vcs-uri.c
@@ -69,20 +69,15 @@ ide_vcs_uri_parse (IdeVcsUri *self,
if (g_once_init_enter (&initialized))
{
- GError *error = NULL;
-
/* http://stackoverflow.com/questions/2514859/regular-expression-for-git-repository */
regex1 = g_regex_new ("file://(.*)", 0, 0, NULL);
- g_assert (error == NULL);
g_assert (regex1);
regex2 = g_regex_new ("(\\w+://)(.+@)*([\\w\\d\\.]+)(:[\\d]+){0,1}/*(.*)", 0, 0, NULL);
- g_assert (error == NULL);
g_assert (regex2);
regex3 = g_regex_new ("(.+@)*([\\w\\d\\.]+):(.*)", 0, 0, NULL);
- g_assert (error == NULL);
g_assert (regex3);
g_once_init_leave (&initialized, TRUE);
diff --git a/src/devhelp/gb-devhelp-view.c b/src/devhelp/gb-devhelp-view.c
index a8dfee8..0f3d582 100644
--- a/src/devhelp/gb-devhelp-view.c
+++ b/src/devhelp/gb-devhelp-view.c
@@ -118,10 +118,9 @@ gb_devhelp_view_set_document (GbDevhelpView *view,
static GbView *
gb_devhelp_view_create_split (GbView *view)
{
- GbDevhelpView *self = (GbDevhelpView *)view;
GbView *ret;
- g_assert (GB_IS_DEVHELP_VIEW (self));
+ g_assert (GB_IS_DEVHELP_VIEW (view));
ret = g_object_new (GB_TYPE_DEVHELP_VIEW,
"document", gb_devhelp_view_get_document (view),
diff --git a/src/greeter/gb-greeter-window.c b/src/greeter/gb-greeter-window.c
index 7738f4e..98979a4 100644
--- a/src/greeter/gb-greeter-window.c
+++ b/src/greeter/gb-greeter-window.c
@@ -202,7 +202,6 @@ gb_greeter_window__recent_projects_items_changed (GbGreeterWindow *self,
guint added,
GListModel *list_model)
{
- IdeRecentProjects *recent_projects = (IdeRecentProjects *)list_model;
GbGreeterProjectRow *row;
gsize i;
@@ -213,7 +212,7 @@ gb_greeter_window__recent_projects_items_changed (GbGreeterWindow *self,
g_assert (GB_IS_GREETER_WINDOW (self));
g_assert (G_IS_LIST_MODEL (list_model));
- g_assert (IDE_IS_RECENT_PROJECTS (recent_projects));
+ g_assert (IDE_IS_RECENT_PROJECTS (list_model));
for (i = 0; i < added; i++)
{
diff --git a/src/preferences/gb-preferences-window.c b/src/preferences/gb-preferences-window.c
index f71f512..e80ed4b 100644
--- a/src/preferences/gb-preferences-window.c
+++ b/src/preferences/gb-preferences-window.c
@@ -175,10 +175,9 @@ static gboolean
gb_preferences_window_key_press_event (GtkWidget *widget,
GdkEventKey *event)
{
- GbPreferencesWindow *self = (GbPreferencesWindow *)widget;
gboolean ret;
- g_return_val_if_fail (GB_IS_PREFERENCES_WINDOW (self), FALSE);
+ g_assert (GB_IS_PREFERENCES_WINDOW (widget));
/*
* Try to propagate the event to any widget that wants to swallow it.
diff --git a/src/project-tree/gb-project-tree-builder.c b/src/project-tree/gb-project-tree-builder.c
index 53d3da1..71fa562 100644
--- a/src/project-tree/gb-project-tree-builder.c
+++ b/src/project-tree/gb-project-tree-builder.c
@@ -270,12 +270,11 @@ gb_project_tree_builder_node_popup (GbTreeBuilder *builder,
GbTreeNode *node,
GMenu *menu)
{
- GbProjectTreeBuilder *self = (GbProjectTreeBuilder *)builder;
GtkApplication *app;
GObject *item;
GMenu *submenu;
- g_assert (GB_IS_PROJECT_TREE_BUILDER (self));
+ g_assert (GB_IS_PROJECT_TREE_BUILDER (builder));
g_assert (GB_IS_TREE_NODE (node));
g_assert (G_IS_MENU (menu));
@@ -325,10 +324,9 @@ static gboolean
gb_project_tree_builder_node_activated (GbTreeBuilder *builder,
GbTreeNode *node)
{
- GbProjectTreeBuilder *self = (GbProjectTreeBuilder *)builder;
GObject *item;
- g_return_val_if_fail (GB_IS_PROJECT_TREE_BUILDER (self), FALSE);
+ g_assert (GB_IS_PROJECT_TREE_BUILDER (builder));
item = gb_tree_node_get_item (node);
diff --git a/src/views/gb-view-stack-actions.c b/src/views/gb-view-stack-actions.c
index 19ebe8e..c2d5781 100644
--- a/src/views/gb-view-stack-actions.c
+++ b/src/views/gb-view-stack-actions.c
@@ -100,26 +100,6 @@ gb_view_stack_actions_move_right (GSimpleAction *action,
}
static void
-gb_view_stack_actions_save (GSimpleAction *action,
- GVariant *param,
- gpointer user_data)
-{
- GbViewStack *self = user_data;
-
- g_assert (GB_IS_VIEW_STACK (self));
-}
-
-static void
-gb_view_stack_actions_save_as (GSimpleAction *action,
- GVariant *param,
- gpointer user_data)
-{
- GbViewStack *self = user_data;
-
- g_assert (GB_IS_VIEW_STACK (self));
-}
-
-static void
do_split_down_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
@@ -299,8 +279,6 @@ static const GActionEntry gGbViewStackActions[] = {
{ "next-view", gb_view_stack_actions_next_view },
{ "previous-view", gb_view_stack_actions_previous_view },
{ "show-list", gb_view_stack_actions_show_list },
- { "save", gb_view_stack_actions_save },
- { "save-as", gb_view_stack_actions_save_as },
{ "split-down", NULL, NULL, "false", gb_view_stack_actions_split_down },
{ "split-left", gb_view_stack_actions_split_left },
{ "split-right", gb_view_stack_actions_split_right },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]