[libgda] Remove warnings from autotools
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Remove warnings from autotools
- Date: Tue, 14 Aug 2018 19:11:13 +0000 (UTC)
commit 3f0aff899903bf78ed1bb162349877fd3e3003e4
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Aug 14 13:57:08 2018 -0500
Remove warnings from autotools
control-center/gdaui-dsn-assistant.c | 3 +--
libgda/gda-data-model-iter.c | 13 +++----------
libgda/gda-server-operation.c | 2 +-
libgda/gda-set.c | 1 -
libgda/gda-value.c | 2 +-
tools/browser/data-manager/data-widget.c | 2 +-
tools/browser/ldap-browser/class-properties.c | 10 +++++-----
tools/browser/ldap-browser/classes-view.c | 2 +-
tools/browser/ldap-browser/entry-properties.c | 10 +++++-----
tools/browser/ldap-browser/filter-editor.c | 2 +-
tools/browser/ldap-browser/hierarchy-view.c | 10 +++++-----
tools/browser/ldap-browser/ldap-classes-page.c | 2 +-
tools/browser/ldap-browser/ldap-entries-page.c | 2 +-
tools/browser/ldap-browser/ldap-favorite-selector.c | 9 ---------
tools/browser/ldap-browser/ldap-search-page.c | 2 +-
tools/browser/ui-support.c | 4 +---
tools/browser/widget-overlay.c | 6 +++---
17 files changed, 31 insertions(+), 51 deletions(-)
---
diff --git a/control-center/gdaui-dsn-assistant.c b/control-center/gdaui-dsn-assistant.c
index 5e84e7541..2209cc4dd 100644
--- a/control-center/gdaui-dsn-assistant.c
+++ b/control-center/gdaui-dsn-assistant.c
@@ -447,8 +447,7 @@ gdaui_dsn_assistant_init (GdauiDsnAssistant *assistant,
{
GtkWidget *label, *vbox, *grid;
GtkAssistant *assist;
- gchar *str;
- GtkStyleContext *context;
+ GtkStyleContext *context;
g_return_if_fail (GDAUI_IS_DSN_ASSISTANT (assistant));
diff --git a/libgda/gda-data-model-iter.c b/libgda/gda-data-model-iter.c
index 6b6d4d1f1..7f298188b 100644
--- a/libgda/gda-data-model-iter.c
+++ b/libgda/gda-data-model-iter.c
@@ -217,7 +217,6 @@ define_holder_for_data_model_column (GdaDataModel *model, gint col, GdaDataModel
gchar *str;
GdaHolder *param;
GdaColumn *column;
- GdaDataModelIterPrivate *priv = gda_data_model_iter_get_instance_private (iter);
column = gda_data_model_describe_column (model, col);
param = (GdaHolder *) g_object_new (GDA_TYPE_HOLDER,
@@ -348,8 +347,8 @@ model_reset_cb (GdaDataModel *model, GdaDataModelIter *iter)
static GError *
validate_holder_change_cb (GdaSet *paramlist, GdaHolder *param, const GValue *new_value)
{
- g_return_if_fail (paramlist != NULL);
- g_return_if_fail (GDA_IS_DATA_MODEL_ITER (paramlist));
+ g_return_val_if_fail (paramlist != NULL, NULL);
+ g_return_val_if_fail (GDA_IS_DATA_MODEL_ITER (paramlist), NULL);
GdaDataModelIter *iter;
gint col;
@@ -681,8 +680,7 @@ gda_data_model_iter_move_to_row_default (GdaDataModel *model, GdaDataModelIter *
gint col;
GdaDataModel *test;
gboolean update_model;
- GdaDataModelIterPrivate *priv = gda_data_model_iter_get_instance_private (iter);
-
+
if ((gda_data_model_iter_get_row (iter) >= 0) &&
! _gda_set_validate ((GdaSet*) iter, NULL))
return FALSE;
@@ -782,7 +780,6 @@ gda_data_model_iter_move_next_default (GdaDataModel *model, GdaDataModelIter *it
gint row;
GdaDataModel *test;
gboolean update_model;
- GdaDataModelIterPrivate *priv = gda_data_model_iter_get_instance_private (iter);
if ((gda_data_model_iter_get_row (iter) >= 0) &&
! _gda_set_validate ((GdaSet*) iter, NULL))
@@ -886,8 +883,6 @@ gda_data_model_iter_move_prev_default (GdaDataModel *model, GdaDataModelIter *it
GdaDataModel *test;
gboolean update_model;
- GdaDataModelIterPrivate *priv = gda_data_model_iter_get_instance_private (iter);
-
if ((gda_data_model_iter_get_row (iter) >= 0) &&
! _gda_set_validate ((GdaSet*) iter, NULL))
return FALSE;
@@ -1096,8 +1091,6 @@ gda_data_model_iter_set_value_at (GdaDataModelIter *iter, gint col, const GValue
g_return_val_if_fail (GDA_IS_DATA_MODEL_ITER (iter), FALSE);
g_return_val_if_fail (value, FALSE);
- GdaDataModelIterPrivate *priv = gda_data_model_iter_get_instance_private (iter);
-
holder = gda_data_model_iter_get_holder_for_field (iter, col);
if (!holder) {
g_set_error (error, GDA_DATA_MODEL_ITER_ERROR, GDA_DATA_MODEL_ITER_COLUMN_OUT_OF_RANGE_ERROR,
diff --git a/libgda/gda-server-operation.c b/libgda/gda-server-operation.c
index 440e67c86..e799a2908 100644
--- a/libgda/gda-server-operation.c
+++ b/libgda/gda-server-operation.c
@@ -1426,7 +1426,7 @@ gda_server_operation_save_data_to_xml_string (GdaServerOperation *op, G_GNUC_UNU
}
buff = xmlBufferCreate ();
xmlNodeDump (buff, node->doc, node, 0, 0);
- str = g_strdup (buff->content);
+ str = g_strdup ((gchar*) buff->content);
xmlBufferFree (buff);
xmlFreeNode (node);
return str;
diff --git a/libgda/gda-set.c b/libgda/gda-set.c
index 816218ea9..3b27e4a8b 100644
--- a/libgda/gda-set.c
+++ b/libgda/gda-set.c
@@ -1088,7 +1088,6 @@ gda_set_new_inline (gint nb, ...)
gchar *id;
gint i;
gboolean allok = TRUE;
- GdaSetPrivate *priv = gda_set_get_instance_private (set);
/* build the list of holders */
va_start (ap, nb);
diff --git a/libgda/gda-value.c b/libgda/gda-value.c
index 01596ebe1..f99a062de 100644
--- a/libgda/gda-value.c
+++ b/libgda/gda-value.c
@@ -3223,7 +3223,7 @@ gda_value_to_xml_string (const GValue *value) {
node = gda_value_to_xml (value);
buff = xmlBufferCreate ();
xmlNodeDump (buff, node->doc, node, 0, 0);
- str = g_strdup (buff->content);
+ str = g_strdup ((gchar*) buff->content);
xmlBufferFree (buff);
xmlFreeNode (node);
return str;
diff --git a/tools/browser/data-manager/data-widget.c b/tools/browser/data-manager/data-widget.c
index 8fb134fc0..9f9084845 100644
--- a/tools/browser/data-manager/data-widget.c
+++ b/tools/browser/data-manager/data-widget.c
@@ -248,7 +248,7 @@ create_or_reuse_part (DataWidget *dwid, DataSource *source, gboolean *out_reused
gtk_container_set_border_width (GTK_CONTAINER (button), 0);
gtk_box_pack_start (GTK_BOX (header), button, FALSE, FALSE, 0);
- GtkWidget *nb, *page;
+ GtkWidget *nb;
nb = gtk_notebook_new ();
gtk_notebook_set_show_border (GTK_NOTEBOOK (nb), FALSE);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), FALSE);
diff --git a/tools/browser/ldap-browser/class-properties.c b/tools/browser/ldap-browser/class-properties.c
index 17ebebf5c..20addba02 100644
--- a/tools/browser/ldap-browser/class-properties.c
+++ b/tools/browser/ldap-browser/class-properties.c
@@ -221,14 +221,14 @@ set_cursor_if_appropriate (GtkTextView *text_view, gint x, gint y, ClassProperti
if (cprop->priv->hovering_over_link) {
if (! hand_cursor)
- hand_cursor = gdk_cursor_new (GDK_HAND2);
+ hand_cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET
(text_view)), GDK_HAND2);
gdk_window_set_cursor (gtk_text_view_get_window (text_view,
GTK_TEXT_WINDOW_TEXT),
hand_cursor);
}
else {
if (!regular_cursor)
- regular_cursor = gdk_cursor_new (GDK_XTERM);
+ regular_cursor = gdk_cursor_new_for_display (gtk_widget_get_display
(GTK_WIDGET (text_view)), GDK_XTERM);
gdk_window_set_cursor (gtk_text_view_get_window (text_view,
GTK_TEXT_WINDOW_TEXT),
regular_cursor);
@@ -248,11 +248,11 @@ visibility_notify_event (GtkWidget *text_view, G_GNUC_UNUSED GdkEventVisibility
ClassProperties *cprop)
{
gint wx, wy, bx, by;
- GdkDeviceManager *manager;
+ GdkSeat *seat;
GdkDevice *pointer;
- manager = gdk_display_get_device_manager (gtk_widget_get_display (text_view));
- pointer = gdk_device_manager_get_client_pointer (manager);
+ seat = gdk_display_get_default_seat (gtk_widget_get_display (text_view));
+ pointer = gdk_seat_get_pointer (seat);
gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
diff --git a/tools/browser/ldap-browser/classes-view.c b/tools/browser/ldap-browser/classes-view.c
index 95c242461..54dc95f9a 100644
--- a/tools/browser/ldap-browser/classes-view.c
+++ b/tools/browser/ldap-browser/classes-view.c
@@ -204,7 +204,7 @@ classes_view_new (TConnection *tcnc, const gchar *classname)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
eview = CLASSES_VIEW (g_object_new (CLASSES_VIEW_TYPE, NULL));
- eview->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ eview->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
g_signal_connect (eview, "drag-data-get",
G_CALLBACK (source_drag_data_get_cb), eview);
diff --git a/tools/browser/ldap-browser/entry-properties.c b/tools/browser/ldap-browser/entry-properties.c
index 63fcadc53..8a0663359 100644
--- a/tools/browser/ldap-browser/entry-properties.c
+++ b/tools/browser/ldap-browser/entry-properties.c
@@ -320,14 +320,14 @@ set_cursor_if_appropriate (GtkTextView *text_view, gint x, gint y, EntryProperti
if (eprop->priv->hovering_over_link) {
if (! hand_cursor)
- hand_cursor = gdk_cursor_new (GDK_HAND2);
+ hand_cursor = gdk_cursor_new_for_display (gtk_widget_get_display (GTK_WIDGET
(text_view)), GDK_HAND2);
gdk_window_set_cursor (gtk_text_view_get_window (text_view,
GTK_TEXT_WINDOW_TEXT),
hand_cursor);
}
else {
if (!regular_cursor)
- regular_cursor = gdk_cursor_new (GDK_XTERM);
+ regular_cursor = gdk_cursor_new_for_display (gtk_widget_get_display
(GTK_WIDGET (text_view)), GDK_XTERM);
gdk_window_set_cursor (gtk_text_view_get_window (text_view,
GTK_TEXT_WINDOW_TEXT),
regular_cursor);
@@ -347,11 +347,11 @@ visibility_notify_event (GtkWidget *text_view, G_GNUC_UNUSED GdkEventVisibility
EntryProperties *eprop)
{
gint wx, wy, bx, by;
- GdkDeviceManager *manager;
+ GdkSeat *seat;
GdkDevice *pointer;
- manager = gdk_display_get_device_manager (gtk_widget_get_display (text_view));
- pointer = gdk_device_manager_get_client_pointer (manager);
+ seat = gdk_display_get_default_seat (gtk_widget_get_display (text_view));
+ pointer = gdk_seat_get_pointer (seat);
gdk_window_get_device_position (gtk_widget_get_window (text_view), pointer, &wx, &wy, NULL);
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (text_view),
GTK_TEXT_WINDOW_WIDGET,
diff --git a/tools/browser/ldap-browser/filter-editor.c b/tools/browser/ldap-browser/filter-editor.c
index b40e3dd3e..97529fc4a 100644
--- a/tools/browser/ldap-browser/filter-editor.c
+++ b/tools/browser/ldap-browser/filter-editor.c
@@ -142,7 +142,7 @@ filter_editor_new (TConnection *tcnc)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
feditor = FILTER_EDITOR (g_object_new (FILTER_EDITOR_TYPE, NULL));
- feditor->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ feditor->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 5);
diff --git a/tools/browser/ldap-browser/hierarchy-view.c b/tools/browser/ldap-browser/hierarchy-view.c
index 1fb11d342..f535082ef 100644
--- a/tools/browser/ldap-browser/hierarchy-view.c
+++ b/tools/browser/ldap-browser/hierarchy-view.c
@@ -210,7 +210,7 @@ hierarchy_view_new (TConnection *tcnc, const gchar *dn)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
eview = HIERARCHY_VIEW (g_object_new (HIERARCHY_VIEW_TYPE, NULL));
- eview->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ eview->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
g_signal_connect (eview, "drag-data-get",
G_CALLBACK (source_drag_data_get_cb), eview);
@@ -365,10 +365,10 @@ test_expand_row_cb (GtkTreeView *tree_view, GtkTreeIter *iter,
g_value_get_boolean (cv)) {
IdleData *data;
data = g_new (IdleData, 1);
- data->tview = g_object_ref (G_OBJECT (tree_view));
- data->store = g_object_ref (G_OBJECT (store));
- data->tree = g_object_ref (G_OBJECT (eview->priv->ldap_tree));
- data->node = g_object_ref (G_OBJECT (node));
+ data->tview = GTK_TREE_VIEW (g_object_ref (G_OBJECT (tree_view)));
+ data->store = GDAUI_TREE_STORE (g_object_ref (G_OBJECT (store)));
+ data->tree = GDA_TREE (g_object_ref (G_OBJECT (eview->priv->ldap_tree)));
+ data->node = GDA_TREE_NODE (g_object_ref (G_OBJECT (node)));
g_idle_add_full (G_PRIORITY_HIGH_IDLE, (GSourceFunc) ldap_update_tree_part,
data, (GDestroyNotify) idle_data_free);
diff --git a/tools/browser/ldap-browser/ldap-classes-page.c b/tools/browser/ldap-browser/ldap-classes-page.c
index e20e0c952..968ab3623 100644
--- a/tools/browser/ldap-browser/ldap-classes-page.c
+++ b/tools/browser/ldap-browser/ldap-classes-page.c
@@ -307,7 +307,7 @@ ldap_classes_page_new (TConnection *tcnc, const gchar *classname)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
ebrowser = LDAP_CLASSES_PAGE (g_object_new (LDAP_CLASSES_PAGE_TYPE, NULL));
- ebrowser->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ ebrowser->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
/* header */
GtkWidget *label;
diff --git a/tools/browser/ldap-browser/ldap-entries-page.c b/tools/browser/ldap-browser/ldap-entries-page.c
index 259908429..f6b5f89b6 100644
--- a/tools/browser/ldap-browser/ldap-entries-page.c
+++ b/tools/browser/ldap-browser/ldap-entries-page.c
@@ -313,7 +313,7 @@ ldap_entries_page_new (TConnection *tcnc, const gchar *dn)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
ebrowser = LDAP_ENTRIES_PAGE (g_object_new (LDAP_ENTRIES_PAGE_TYPE, NULL));
- ebrowser->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ ebrowser->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
/* header */
GtkWidget *label;
diff --git a/tools/browser/ldap-browser/ldap-favorite-selector.c
b/tools/browser/ldap-browser/ldap-favorite-selector.c
index 5c105bba7..6504745fa 100644
--- a/tools/browser/ldap-browser/ldap-favorite-selector.c
+++ b/tools/browser/ldap-browser/ldap-favorite-selector.c
@@ -383,15 +383,6 @@ do_popup_menu (G_GNUC_UNUSED GtkWidget *widget, GdkEventButton *event, LdapFavor
fsel->priv->popup_menu = menu;
}
-
- if (event) {
- button = event->button;
- event_time = event->time;
- }
- else {
- button = 0;
- event_time = gtk_get_current_event_time ();
- }
gtk_menu_popup_at_pointer (GTK_MENU (fsel->priv->popup_menu), NULL);
}
diff --git a/tools/browser/ldap-browser/ldap-search-page.c b/tools/browser/ldap-browser/ldap-search-page.c
index 4e223777e..c58ce0386 100644
--- a/tools/browser/ldap-browser/ldap-search-page.c
+++ b/tools/browser/ldap-browser/ldap-search-page.c
@@ -226,7 +226,7 @@ ldap_search_page_new (TConnection *tcnc, const gchar *base_dn)
g_return_val_if_fail (T_IS_CONNECTION (tcnc), NULL);
epage = LDAP_SEARCH_PAGE (g_object_new (LDAP_SEARCH_PAGE_TYPE, NULL));
- epage->priv->tcnc = g_object_ref ((GObject*) tcnc);
+ epage->priv->tcnc = T_CONNECTION (g_object_ref ((GObject*) tcnc));
/* header */
GtkWidget *label;
diff --git a/tools/browser/ui-support.c b/tools/browser/ui-support.c
index 405728a31..ffdd8b60e 100644
--- a/tools/browser/ui-support.c
+++ b/tools/browser/ui-support.c
@@ -257,7 +257,6 @@ ui_show_message (GtkWindow *parent, const gchar *format, ...)
void
ui_show_help (GtkWindow *parent, const gchar *topic)
{
- GdkScreen *screen;
GError *error = NULL;
const gchar *const *langs;
@@ -301,9 +300,8 @@ ui_show_help (GtkWindow *parent, const gchar *topic)
gchar *ruri;
- screen = gtk_widget_get_screen ((GtkWidget*) parent);
ruri = g_strdup_printf ("ghelp:%s", uri);
- gtk_show_uri (screen, ruri, gtk_get_current_event_time (), &error);
+ gtk_show_uri_on_window (parent, ruri, gtk_get_current_event_time (), &error);
g_free (ruri);
if (error) {
diff --git a/tools/browser/widget-overlay.c b/tools/browser/widget-overlay.c
index c11d285c8..e3af90d80 100644
--- a/tools/browser/widget-overlay.c
+++ b/tools/browser/widget-overlay.c
@@ -892,14 +892,14 @@ widget_overlay_draw (GtkWidget *widget, cairo_t *cr)
cairo_surface_t *surface;
GtkAllocation child_area;
double x, y;
-
+ x = y = 0.0;
gtk_widget_get_allocation (cd->child, &child_area);
child_area.width *= cd->scale;
child_area.height *= cd->scale;
switch (cd->halign) {
case WIDGET_OVERLAY_ALIGN_FILL:
case WIDGET_OVERLAY_ALIGN_START:
- x = 0;
+ x = 0.0;
break;
case WIDGET_OVERLAY_ALIGN_END:
x = area.width - child_area.width;
@@ -911,7 +911,7 @@ widget_overlay_draw (GtkWidget *widget, cairo_t *cr)
switch (cd->valign) {
case WIDGET_OVERLAY_ALIGN_FILL:
case WIDGET_OVERLAY_ALIGN_START:
- y = 0;
+ y = 0.0;
break;
case WIDGET_OVERLAY_ALIGN_END:
y = area.height - child_area.height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]