[libgda] Fixing warnings: types and unused variables



commit 518799effbd00c0dba87a42828c5ca239f3559d2
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date:   Fri Feb 22 17:50:38 2019 -0600

    Fixing warnings: types and unused variables

 libgda-ui/data-entries/gdaui-entry-boolean.c |  2 --
 libgda-ui/data-entries/gdaui-entry-combo.c   | 10 ----------
 libgda-ui/data-entries/gdaui-entry-none.c    |  3 ---
 libgda-ui/demos/main.c                       |  3 +--
 libgda-ui/gdaui-basic-form.c                 |  1 -
 libgda-ui/gdaui-init.c                       |  2 --
 libgda-ui/gdaui-login.c                      |  1 -
 libgda-ui/gdaui-provider-selector.c          |  2 --
 libgda-ui/gdaui-raw-form.c                   |  3 ---
 libgda-ui/gdaui-raw-grid.c                   |  1 -
 libgda-ui/gdaui-server-operation.c           | 23 +++++++++++-----------
 libgda/gda-connection.c                      |  1 -
 libgda/gda-data-model-select.c               |  1 -
 libgda/gda-holder.c                          |  3 ---
 libgda/gda-meta-store.c                      |  2 +-
 libgda/gda-util.c                            |  6 ++----
 providers/web/gda-web-provider.c             |  2 +-
 providers/web/gda-web-util.c                 |  6 +++---
 testing/gda-test-connection.c                |  2 +-
 tests/data-models/check_model_copy.c         |  2 +-
 tests/data-models/check_model_errors.c       | 29 +++++++++++++++++-----------
 tests/data-models/check_model_import.c       |  2 +-
 tests/data-models/check_pmodel.c             |  2 --
 tests/data-models/check_vcnc.c               |  1 -
 tests/db/check-db-catalog.c                  |  2 --
 tests/multi-threading/check_parser.c         |  8 ++++----
 tests/test-sql-builder.c                     |  2 +-
 tests/ui/check_raw_grid_model.c              |  1 -
 tests/value-holders/check_holder.c           |  2 --
 tests/value-holders/check_statement.c        |  8 ++++----
 tools/browser/browser-window.c               |  1 -
 tools/browser/ui-formgrid.c                  |  1 -
 tools/common/t-config-info.c                 |  1 -
 tools/common/t-connection.c                  |  2 --
 tools/common/web-server.c                    |  2 +-
 35 files changed, 51 insertions(+), 89 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-entry-boolean.c b/libgda-ui/data-entries/gdaui-entry-boolean.c
index 2f0d107e0..8d91f9cd5 100644
--- a/libgda-ui/data-entries/gdaui-entry-boolean.c
+++ b/libgda-ui/data-entries/gdaui-entry-boolean.c
@@ -41,8 +41,6 @@ G_DEFINE_TYPE_WITH_PRIVATE (GdauiEntryBoolean, gdaui_entry_boolean, GDAUI_TYPE_E
 static void
 gdaui_entry_boolean_class_init (GdauiEntryBooleanClass * class)
 {
-       GObjectClass   *object_class = G_OBJECT_CLASS (class);
-
        GDAUI_ENTRY_WRAPPER_CLASS (class)->create_entry = create_entry;
        GDAUI_ENTRY_WRAPPER_CLASS (class)->real_set_value = real_set_value;
        GDAUI_ENTRY_WRAPPER_CLASS (class)->real_get_value = real_get_value;
diff --git a/libgda-ui/data-entries/gdaui-entry-combo.c b/libgda-ui/data-entries/gdaui-entry-combo.c
index e57cfe3fb..5f37cfe77 100644
--- a/libgda-ui/data-entries/gdaui-entry-combo.c
+++ b/libgda-ui/data-entries/gdaui-entry-combo.c
@@ -695,8 +695,6 @@ gdaui_entry_combo_set_default_values (GdauiEntryCombo *combo, G_GNUC_UNUSED GSLi
 static void
 gdaui_entry_combo_set_value (GdauiDataEntry *iface, G_GNUC_UNUSED const GValue *value)
 {
-       GdauiEntryCombo *combo;
-
         g_return_if_fail (iface && GDAUI_IS_ENTRY_COMBO (iface));
         //combo = GDAUI_ENTRY_COMBO (iface);
         //GdauiEntryComboPrivate *priv = gdaui_entry_combo_get_instance_private (combo);
@@ -707,8 +705,6 @@ gdaui_entry_combo_set_value (GdauiDataEntry *iface, G_GNUC_UNUSED const GValue *
 static GValue *
 gdaui_entry_combo_get_value (GdauiDataEntry *iface)
 {
-        GdauiEntryCombo *combo;
-       
         g_return_val_if_fail (iface && GDAUI_IS_ENTRY_COMBO (iface), NULL);
         //combo = GDAUI_ENTRY_COMBO (iface);
         //GdauiEntryComboPrivate *priv = gdaui_entry_combo_get_instance_private (combo);
@@ -721,8 +717,6 @@ gdaui_entry_combo_get_value (GdauiDataEntry *iface)
 static void
 gdaui_entry_combo_set_ref_value (GdauiDataEntry *iface, G_GNUC_UNUSED const GValue * value)
 {
-        GdauiEntryCombo *combo;
-       
         g_return_if_fail (iface && GDAUI_IS_ENTRY_COMBO (iface));
         //combo = GDAUI_ENTRY_COMBO (iface);
         //GdauiEntryComboPrivate *priv = gdaui_entry_combo_get_instance_private (combo);
@@ -733,8 +727,6 @@ gdaui_entry_combo_set_ref_value (GdauiDataEntry *iface, G_GNUC_UNUSED const GVal
 static const GValue *
 gdaui_entry_combo_get_ref_value (GdauiDataEntry *iface)
 {
-        GdauiEntryCombo *combo;
-       
         g_return_val_if_fail (iface && GDAUI_IS_ENTRY_COMBO (iface), NULL);
         //combo = GDAUI_ENTRY_COMBO (iface);
         //GdauiEntryComboPrivate *priv = gdaui_entry_combo_get_instance_private (combo);
@@ -746,8 +738,6 @@ gdaui_entry_combo_get_ref_value (GdauiDataEntry *iface)
 static void
 gdaui_entry_combo_set_value_default (GdauiDataEntry *iface, G_GNUC_UNUSED const GValue * value)
 {
-        GdauiEntryCombo *combo;
-
         g_return_if_fail (iface && GDAUI_IS_ENTRY_COMBO (iface));
         //combo = GDAUI_ENTRY_COMBO (iface);
         //GdauiEntryComboPrivate *priv = gdaui_entry_combo_get_instance_private (combo);
diff --git a/libgda-ui/data-entries/gdaui-entry-none.c b/libgda-ui/data-entries/gdaui-entry-none.c
index 3374acda7..32d7e38ce 100644
--- a/libgda-ui/data-entries/gdaui-entry-none.c
+++ b/libgda-ui/data-entries/gdaui-entry-none.c
@@ -108,11 +108,8 @@ static GtkWidget *
 create_entry (GdauiEntryWrapper *mgwrap)
 {
        GtkWidget *evbox, *label;
-       GdauiEntryNone *entry;
 
        g_return_val_if_fail (mgwrap && GDAUI_IS_ENTRY_NONE (mgwrap), NULL);
-       entry = GDAUI_ENTRY_NONE (mgwrap);
-       GdauiEntryNonePrivate *priv = gdaui_entry_none_get_instance_private (entry);
 
        evbox = gtk_event_box_new ();
        gtk_widget_add_events (evbox, GDK_FOCUS_CHANGE_MASK);
diff --git a/libgda-ui/demos/main.c b/libgda-ui/demos/main.c
index fc39a111a..35d0a5e7d 100644
--- a/libgda-ui/demos/main.c
+++ b/libgda-ui/demos/main.c
@@ -588,9 +588,8 @@ create_text (GtkTextBuffer **buffer,
 {
        GtkWidget *scrolled_window;
        GtkWidget *text_view;
-       PangoFontDescription *font_desc;
 
-       scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+  scrolled_window = gtk_scrolled_window_new (NULL, NULL);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
                                        GTK_POLICY_AUTOMATIC,
                                        GTK_POLICY_AUTOMATIC);
diff --git a/libgda-ui/gdaui-basic-form.c b/libgda-ui/gdaui-basic-form.c
index 0f3bc3655..7f2d65a1d 100644
--- a/libgda-ui/gdaui-basic-form.c
+++ b/libgda-ui/gdaui-basic-form.c
@@ -883,7 +883,6 @@ create_entry_widget (SingleEntry *sentry)
                const GValue *val, *default_val, *value;
                gboolean nnul;
                const gchar *plugin = NULL;
-               const GValue *plugin_val;
 
                items_count = gda_set_group_get_n_nodes (sg);
                if ( items_count != 1) { /* only 1 item in the list */
diff --git a/libgda-ui/gdaui-init.c b/libgda-ui/gdaui-init.c
index 00370453f..286c18b0a 100644
--- a/libgda-ui/gdaui-init.c
+++ b/libgda-ui/gdaui-init.c
@@ -89,8 +89,6 @@ gdaui_init (void)
                gdaui_plugins_hash = init_plugins_hash ();
 
        /* initialize CSS */
-       GBytes *css_data;
-       GError *error = NULL;
   GtkCssProvider *css_provider;
   css_provider = gtk_css_provider_new ();
   g_object_connect (css_provider, "signal::parsing-error", catch_css_parsing_errors, NULL, NULL);
diff --git a/libgda-ui/gdaui-login.c b/libgda-ui/gdaui-login.c
index 1fccce77d..8db99cdfd 100644
--- a/libgda-ui/gdaui-login.c
+++ b/libgda-ui/gdaui-login.c
@@ -302,7 +302,6 @@ gdaui_login_finalize (GObject *object)
        GdauiLogin *login = (GdauiLogin *) object;
 
        g_return_if_fail (GDAUI_IS_LOGIN (login));
-       GdauiLoginPrivate *priv = gdaui_login_get_instance_private (login);
 
        GdaConfig *conf = gda_config_get ();
        g_signal_handlers_disconnect_by_func (conf,
diff --git a/libgda-ui/gdaui-provider-selector.c b/libgda-ui/gdaui-provider-selector.c
index 7d4b29f6e..4a0e07112 100644
--- a/libgda-ui/gdaui-provider-selector.c
+++ b/libgda-ui/gdaui-provider-selector.c
@@ -72,8 +72,6 @@ gdaui_provider_selector_show (GtkWidget *widget)
 static void
 gdaui_provider_selector_class_init (GdauiProviderSelectorClass *klass)
 {
-       GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
        GTK_WIDGET_CLASS (klass)->show = gdaui_provider_selector_show;
 }
 
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index 365914d74..08d9f86ac 100644
--- a/libgda-ui/gdaui-raw-form.c
+++ b/libgda-ui/gdaui-raw-form.c
@@ -732,11 +732,8 @@ gdaui_raw_form_get_proxy (GdauiDataProxy *iface)
 void
 gdaui_raw_form_set_column_editable (GdauiDataProxy *iface, G_GNUC_UNUSED gint column, G_GNUC_UNUSED gboolean 
editable)
 {
-       GdauiRawForm *form;
 
        g_return_if_fail (GDAUI_IS_RAW_FORM (iface));
-       form = GDAUI_RAW_FORM (iface);
-       GdauiRawFormPrivate *priv = gdaui_raw_form_get_instance_private (form);
 
        TO_IMPLEMENT;
        /* What needs to be done:
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index 7e6ce4719..d36ccf39e 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -688,7 +688,6 @@ create_columns_data (GdauiRawGrid *grid)
                        /* single direct parameter */
                        GType g_type;
                        const gchar *plugin = NULL;
-                       const GValue *plugin_val;
                        gchar *title;
                        gint model_col;
 
diff --git a/libgda-ui/gdaui-server-operation.c b/libgda-ui/gdaui-server-operation.c
index 53d3357e3..0574dddbc 100644
--- a/libgda-ui/gdaui-server-operation.c
+++ b/libgda-ui/gdaui-server-operation.c
@@ -1114,8 +1114,9 @@ gdaui_server_operation_update_parameters (GdauiServerOperation *form, GError** e
 /*
  * CREATE_TABLE "/FIELDS_A" Custom widgets rendering
  */
-static void create_table_grid_fields_iter_row_changed_cb (GdaDataModelIter *grid_iter, gint row,
-                                                         GdaDataModelIter *form_iter);
+//static void create_table_grid_fields_iter_row_changed_cb (GdaDataModelIter *grid_iter, gint row,
+//                                                       GdaDataModelIter *form_iter);
+
 // FIXME: Removed to avoid warning
 //static void create_table_proxy_row_inserted_cb (GdaDataProxy *proxy, gint row, GdauiServerOperation *form);
 // FIXME: Removed to avoid warning
@@ -1223,15 +1224,15 @@ static void create_table_grid_fields_iter_row_changed_cb (GdaDataModelIter *grid
 /*     return hlayout; */
 /* } */
 
-static void
-create_table_grid_fields_iter_row_changed_cb (GdaDataModelIter *iter1, gint row, GdaDataModelIter *iter2)
-{
-       g_signal_handlers_block_by_func (G_OBJECT (iter2),
-                                        G_CALLBACK (create_table_grid_fields_iter_row_changed_cb), iter1);
-       gda_data_model_iter_move_to_row (iter2, row);
-       g_signal_handlers_unblock_by_func (G_OBJECT (iter2),
-                                          G_CALLBACK (create_table_grid_fields_iter_row_changed_cb), iter1);
-}
+/* static void */
+/* create_table_grid_fields_iter_row_changed_cb (GdaDataModelIter *iter1, gint row, GdaDataModelIter *iter2) 
*/
+/* { */
+/*     g_signal_handlers_block_by_func (G_OBJECT (iter2), */
+/*                                      G_CALLBACK (create_table_grid_fields_iter_row_changed_cb), iter1); */
+/*     gda_data_model_iter_move_to_row (iter2, row); */
+/*     g_signal_handlers_unblock_by_func (G_OBJECT (iter2), */
+/*                                        G_CALLBACK (create_table_grid_fields_iter_row_changed_cb), iter1); 
*/
+/* } */
 
 /* static void */
 /* create_table_proxy_row_inserted_cb (GdaDataProxy *proxy, gint row, GdauiServerOperation *form) */
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 1ff77be86..e140fabb9 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -5051,7 +5051,6 @@ gda_connection_update_meta_store (GdaConnection *cnc, GdaMetaContext *context, G
                }
 #endif
                                        
-               gulong signal_id;
                DownstreamCallbackData cbd;
                gboolean retval = TRUE;
                
diff --git a/libgda/gda-data-model-select.c b/libgda/gda-data-model-select.c
index aec233981..54541c9fb 100644
--- a/libgda/gda-data-model-select.c
+++ b/libgda/gda-data-model-select.c
@@ -135,7 +135,6 @@ static void gda_data_model_select_set_property (GObject      *object,
                                                 const GValue *value,
                                                 GParamSpec   *pspec)
 {
-  GdaDataModelSelectPrivate *priv = gda_data_model_select_get_instance_private (GDA_DATA_MODEL_SELECT 
(object));
   switch (property_id) {
   case PROP_VALID:
     break;
diff --git a/libgda/gda-holder.c b/libgda/gda-holder.c
index 528cd25fa..7e42bd79a 100644
--- a/libgda/gda-holder.c
+++ b/libgda/gda-holder.c
@@ -417,7 +417,6 @@ gda_holder_new_inline (GType type, const gchar *id, ...)
 {
        GdaHolder *holder;
 
-       static GMutex serial_mutex;
        static guint serial = 0;
        const gchar *idm = NULL;
 
@@ -430,7 +429,6 @@ gda_holder_new_inline (GType type, const gchar *id, ...)
        }
 
        holder = gda_holder_new (type, idm);
-       GdaHolderPrivate *priv = gda_holder_get_instance_private (holder);
        if (holder) {
                GValue *value;
                va_list ap;
@@ -672,7 +670,6 @@ gda_holder_get_property (GObject *object,
                         GParamSpec *pspec)
 {
        GdaHolder *holder;
-       const GValue *cvalue;
 
        holder = GDA_HOLDER (object);
        GdaHolderPrivate *priv = gda_holder_get_instance_private (holder);
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 8273558cf..bf973906f 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -1604,7 +1604,7 @@ create_db_objects (GdaMetaStoreClass *klass, GdaMetaStore *store)
        }
        g_clear_error (&lerror);
        schema = (gchar*) g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (ostream));
-       doc = xmlReadDoc (schema, "", NULL, XML_PARSE_RECOVER);
+       doc = xmlReadDoc ((const xmlChar*) schema, "", NULL, XML_PARSE_RECOVER);
        g_object_unref (ostream);
        g_object_unref (istream);
        g_object_unref (res);
diff --git a/libgda/gda-util.c b/libgda/gda-util.c
index 0b6188a6e..49fc4a257 100644
--- a/libgda/gda-util.c
+++ b/libgda/gda-util.c
@@ -733,7 +733,7 @@ gda_utility_holder_load_attributes (GdaHolder *holder, xmlNodePtr node, GSList *
                                xmlChar *att_name;
                                att_name = xmlGetProp (vnode, (xmlChar*) "name");
                                if (att_name) {
-                                       g_object_set_data_full ((GObject*) holder, att_name, g_strdup 
((gchar*) xmlNodeGetContent (vnode)), (GDestroyNotify) g_free);
+                                       g_object_set_data_full ((GObject*) holder, (const gchar*) att_name, 
g_strdup ((gchar*) xmlNodeGetContent (vnode)), (GDestroyNotify) g_free);
                                }
                                vnode = vnode->next;
                                continue;
@@ -3205,10 +3205,8 @@ _parse_iso8601_time (GdaTime *timegda, const gchar *value, gchar sep, glong time
        unsigned long int tmp;
        const char *endptr;
        gchar *stz = NULL;
-       gchar *fs = NULL;
        gdouble seconds = 0.0;
-       glong fraction = 0;
-       int h, m, s;
+       int h, m;
        GTimeZone *tz;
 
 
diff --git a/providers/web/gda-web-provider.c b/providers/web/gda-web-provider.c
index 8e86d517a..41154f09e 100644
--- a/providers/web/gda-web-provider.c
+++ b/providers/web/gda-web-provider.c
@@ -471,7 +471,7 @@ gda_web_provider_open_connection (GdaServerProvider *provider, GdaConnection *cn
         * change key: cdata->key = MD5(cdata->key)
         */
        gchar *md5str;
-       md5str = g_compute_checksum_for_data (G_CHECKSUM_MD5, cdata->key, strlen (cdata->key));
+       md5str = g_compute_checksum_for_data (G_CHECKSUM_MD5, (const guchar*) cdata->key, strlen 
(cdata->key));
        g_free (cdata->key);
        cdata->key = md5str;
 
diff --git a/providers/web/gda-web-util.c b/providers/web/gda-web-util.c
index 86f191b2e..0409cc9b9 100644
--- a/providers/web/gda-web-util.c
+++ b/providers/web/gda-web-util.c
@@ -35,7 +35,7 @@ check_hash (const gchar *key, const gchar *data, const gchar *expected_hash)
        gboolean retval = TRUE;
        gchar *md5str;
 
-       md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, key, strlen (key),
+       md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, (const guchar*) key, strlen (key),
                                            data, -1);
        
        if (strcmp (md5str, expected_hash))
@@ -372,7 +372,7 @@ _gda_web_send_message_to_frontend (GdaConnection *cnc, WebConnectionData *cdata,
        /* finalize and send message */
        if (hash_key) {
                gchar *md5str;
-               md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, hash_key, strlen (hash_key),
+               md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, (const guchar*) hash_key, strlen 
(hash_key),
                                                    message, -1);
 
                GString *string;
@@ -450,7 +450,7 @@ _gda_web_compute_token (WebConnectionData *cdata)
        g_return_val_if_fail (cdata->next_challenge && cdata->key, NULL);
 
        gchar *md5str;
-       md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, cdata->key, strlen (cdata->key),
+       md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5, (const guchar*) cdata->key, strlen (cdata->key),
                                            cdata->next_challenge, -1); 
        return md5str;
 }
diff --git a/testing/gda-test-connection.c b/testing/gda-test-connection.c
index 53a019a38..5e1adeb79 100644
--- a/testing/gda-test-connection.c
+++ b/testing/gda-test-connection.c
@@ -92,7 +92,7 @@ main (int argc, char **argv)
                if (!info)
                        g_error (_("DSN '%s' is not declared"), dsn);
                else {
-                       cnc = gda_connection_open_from_dsn (info->name, auth_string ? auth_string : 
info->auth_string,
+                       cnc = gda_connection_open_from_dsn_name (info->name, auth_string ? auth_string : 
info->auth_string,
                                                            0, &error);
                        if (!cnc) {
                                g_warning (_("Can't open connection to DSN %s: %s\n"), info->name,
diff --git a/tests/data-models/check_model_copy.c b/tests/data-models/check_model_copy.c
index 13c257aa0..a81536d9c 100644
--- a/tests/data-models/check_model_copy.c
+++ b/tests/data-models/check_model_copy.c
@@ -118,7 +118,7 @@ do_test_load_file (const gchar *filename)
                /* abort the test */
                return TRUE;
        root = xmlDocGetRootElement (doc);
-       if (strcmp (root->name, "gda_array")) {
+       if (g_strcmp0 ((const gchar*) root->name, "gda_array")) {
                /* abort the test */
                xmlFreeDoc (doc);
                return TRUE;
diff --git a/tests/data-models/check_model_errors.c b/tests/data-models/check_model_errors.c
index 6810b47b1..1fae2d9ad 100644
--- a/tests/data-models/check_model_errors.c
+++ b/tests/data-models/check_model_errors.c
@@ -317,9 +317,15 @@ compare_data_models (GdaDataModel *model1, GdaDataModel *model2, GError **error)
 static gint
 test2 (GdaConnection *cnc)
 {
-#define TABLE_NAME "data"
-       GdaDataModel *model;
+       GdaDataModel *model = NULL;
        gint nfailed = 0;
+       GdaVirtualProvider *virtual_provider = NULL;
+       GError *lerror = NULL;
+       GdaConnection *vcnc = NULL;
+       GdaDataModelIter *iter = NULL;
+       GdaStatement *stmt;
+
+#define TABLE_NAME "data"
 
        model = data_model_errors_new ();
        if (!model) {
@@ -330,11 +336,6 @@ test2 (GdaConnection *cnc)
                goto out;
        }
 
-       GdaVirtualProvider *virtual_provider;
-       GError *lerror = NULL;
-       GdaConnection *vcnc;
-       GdaDataModelIter *iter = NULL;
-       GdaStatement *stmt;
        virtual_provider = gda_vprovider_data_model_new ();
        vcnc = gda_virtual_connection_open (virtual_provider, GDA_CONNECTION_OPTIONS_NONE, &lerror);
        if (!vcnc) {
@@ -476,12 +477,18 @@ test2 (GdaConnection *cnc)
        }
 
  out:
-       if (iter)
+       if (iter != NULL) {
                g_object_unref (iter);
-       if (model)
+       }
+       if (model != NULL) {
                g_object_unref (model);
-       g_object_unref (vcnc);
-       g_object_unref (virtual_provider);
+       }
+       if (vcnc != NULL) {
+               g_object_unref (vcnc);
+       }
+       if (virtual_provider != NULL) {
+               g_object_unref (virtual_provider);
+       }
        
        return nfailed;
 }
diff --git a/tests/data-models/check_model_import.c b/tests/data-models/check_model_import.c
index 129f9de34..cd47014de 100644
--- a/tests/data-models/check_model_import.c
+++ b/tests/data-models/check_model_import.c
@@ -115,7 +115,7 @@ do_test_load_file (const gchar *filename)
                /* abort the test */
                return TRUE;
        root = xmlDocGetRootElement (doc);
-       if (strcmp (root->name, "gda_array")) {
+       if (g_strcmp0 ((const gchar*) root->name, "gda_array")) {
                /* abort the test */
                xmlFreeDoc (doc);
                return TRUE;
diff --git a/tests/data-models/check_pmodel.c b/tests/data-models/check_pmodel.c
index df57d40f1..dae2e7263 100644
--- a/tests/data-models/check_pmodel.c
+++ b/tests/data-models/check_pmodel.c
@@ -971,7 +971,6 @@ test9 (GdaConnection *cnc)
        GdaStatement *stmt;
        gint nfailed = 0;
        GdaSet *params;
-       GValue *value;
 
        clear_signals ();
 
@@ -1568,7 +1567,6 @@ test15 (GdaConnection *cnc)
        GdaStatement *stmt;
        GdaSet *params;
        gint nfailed = 0;
-       gint idmax = 0;
 
        clear_signals ();
        /* Dump all data*/
diff --git a/tests/data-models/check_vcnc.c b/tests/data-models/check_vcnc.c
index b28c33c01..bd63fca70 100644
--- a/tests/data-models/check_vcnc.c
+++ b/tests/data-models/check_vcnc.c
@@ -202,7 +202,6 @@ test1 (Data *data) {
 
 static gchar*
 create_connection_string (Data *data) {
-  GFile *db;
   GFile *d;
   GRand *rand;
   gint i;
diff --git a/tests/db/check-db-catalog.c b/tests/db/check-db-catalog.c
index 1a7f3356a..0160fcbe3 100644
--- a/tests/db/check-db-catalog.c
+++ b/tests/db/check-db-catalog.c
@@ -349,8 +349,6 @@ test_db_catalog_parse_cnc (DbCatalogCnc *self,
 
               g_assert_nonnull (value);
 
-              GType ggtype = G_VALUE_TYPE(value);
-
               g_assert_true (TRUE && g_value_get_boolean (value));
             }
 
diff --git a/tests/multi-threading/check_parser.c b/tests/multi-threading/check_parser.c
index 8ce6629b4..d2a224da7 100644
--- a/tests/multi-threading/check_parser.c
+++ b/tests/multi-threading/check_parser.c
@@ -245,9 +245,9 @@ start_thread (ThData *data)
 
                                expected = xmlNodeGetContent (snode);
                                mode = xmlGetProp (snode, BAD_CAST "mode");
-                               if ((mode && !strcmp (mode, "delim") && 
+                               if ((mode && !g_strcmp0 ((const gchar*) mode, "delim") &&
                                     (data->current_tested_mode == GDA_SQL_PARSER_MODE_DELIMIT)) ||
-                                   ((!mode || strcmp (mode, "delim")) &&
+                                   ((!mode || g_strcmp0 ((const gchar*) mode, "delim")) &&
                                     (data->current_tested_mode == GDA_SQL_PARSER_MODE_PARSE))) {
                                        if (sql) {
                                                thpriv->nfailures += do_test (parser, id, sql, expected, 
NULL, NULL);
@@ -265,9 +265,9 @@ start_thread (ThData *data)
                                mode = xmlGetProp (snode, BAD_CAST "mode");
                                error_line = xmlGetProp (snode, BAD_CAST "line");
                                error_col = xmlGetProp (snode, BAD_CAST "col");
-                               if ((mode && !strcmp (mode, "delim") && 
+                               if ((mode && !g_strcmp0 ((const gchar*) mode, "delim") &&
                                     (data->current_tested_mode == GDA_SQL_PARSER_MODE_DELIMIT)) ||
-                                   ((!mode || strcmp (mode, "delim")) &&
+                                   ((!mode || g_strcmp0 ((const gchar*) mode, "delim")) &&
                                     (data->current_tested_mode == GDA_SQL_PARSER_MODE_PARSE))) {
                                        if (sql) {
                                                thpriv->nfailures += do_test (parser, id, sql, NULL, 
error_line, error_col);
diff --git a/tests/test-sql-builder.c b/tests/test-sql-builder.c
index ff022fb60..8397e1c9c 100644
--- a/tests/test-sql-builder.c
+++ b/tests/test-sql-builder.c
@@ -631,7 +631,7 @@ build13 (void)
 
        gchar *data = "abc'de\\fghijklm";
        GdaBinary *bin = gda_binary_new ();
-       gda_binary_set_data (bin, data, 10);
+       gda_binary_set_data (bin, (const guchar*) data, 10);
        gda_sql_builder_add_field_value_id (b,
                                            gda_sql_builder_add_expr (b, NULL, GDA_TYPE_BINARY, bin), 0);
 
diff --git a/tests/ui/check_raw_grid_model.c b/tests/ui/check_raw_grid_model.c
index c9effdf3a..da4d2947d 100644
--- a/tests/ui/check_raw_grid_model.c
+++ b/tests/ui/check_raw_grid_model.c
@@ -31,7 +31,6 @@ main (int argc, char** argv)
        /* open connection */
        cnc = ui_tests_common_open_connection ();
 
-       GdaSet *set;
        GdauiRawGrid *grid;
        GdaDataModel *model;
        GdaDataModelIter *iter1, *iter2;
diff --git a/tests/value-holders/check_holder.c b/tests/value-holders/check_holder.c
index 00285bace..32cdfaf2c 100644
--- a/tests/value-holders/check_holder.c
+++ b/tests/value-holders/check_holder.c
@@ -969,8 +969,6 @@ static gboolean
 test12 (GError **error)
 {
        GdaHolder *h;
-       const GValue *cvalue;
-       GValue *value;
 
        h = gda_holder_new (GDA_TYPE_NULL, "id");
 
diff --git a/tests/value-holders/check_statement.c b/tests/value-holders/check_statement.c
index eff7f3db5..76984226b 100644
--- a/tests/value-holders/check_statement.c
+++ b/tests/value-holders/check_statement.c
@@ -178,9 +178,9 @@ test2 (GError **error)
                if (strcmp ((gchar*) node->name, "test"))
                         continue;
                xmlNodePtr snode;
-                xmlChar *sql = NULL;
-                xmlChar *id;
-                xmlChar *prov_name;
+               xmlChar *sql = NULL;
+               xmlChar *id;
+               xmlChar *prov_name;
 
                prov_name = xmlGetProp (node, BAD_CAST "provider");
                if (prov_name) {
@@ -202,7 +202,7 @@ test2 (GError **error)
                GdaStatement *stmt;
                GError *lerror = NULL;
                
-               stmt = gda_sql_parser_parse_string (parser, sql, NULL, &lerror);
+               stmt = gda_sql_parser_parse_string (parser, (const gchar*) sql, NULL, &lerror);
                xmlFree (sql);
                id = xmlGetProp (node, BAD_CAST "id");
                g_print ("===== TEST %s\n", id);
diff --git a/tools/browser/browser-window.c b/tools/browser/browser-window.c
index 41191f281..fc51ac115 100644
--- a/tools/browser/browser-window.c
+++ b/tools/browser/browser-window.c
@@ -128,7 +128,6 @@ static void
 browser_window_class_init (BrowserWindowClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
-       GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
        parent_class = g_type_class_peek_parent (klass);
 
diff --git a/tools/browser/ui-formgrid.c b/tools/browser/ui-formgrid.c
index 16201712b..2b0a28f99 100644
--- a/tools/browser/ui-formgrid.c
+++ b/tools/browser/ui-formgrid.c
@@ -604,7 +604,6 @@ action_executed_holder_changed_cb (G_GNUC_UNUSED GdaSet *params, G_GNUC_UNUSED G
        if (! aed->formgrid->priv->autoupdate || ! aed->formgrid->priv->autoupdate_possible)
                return;
 
-       GError *error = NULL;
        gda_data_model_freeze (aed->model);
   // FIXME: Use a GdaDataModelSelect instead
        /* if (!t_connection_rerun_select (aed->tcnc, aed->model, &error)) { */
diff --git a/tools/common/t-config-info.c b/tools/common/t-config-info.c
index 5c2f2402c..be885a323 100644
--- a/tools/common/t-config-info.c
+++ b/tools/common/t-config-info.c
@@ -567,7 +567,6 @@ t_config_info_purge_data_files (const gchar *criteria, GError **error)
                return NULL;
        }
 
-       const gchar *name;
        GFile *confdir;
   GFileEnumerator *ch_files;
 
diff --git a/tools/common/t-connection.c b/tools/common/t-connection.c
index 3df377294..ebbfabd4c 100644
--- a/tools/common/t-connection.c
+++ b/tools/common/t-connection.c
@@ -1197,8 +1197,6 @@ t_connection_update_meta_data (TConnection *tcnc, GError ** error)
 {
        g_return_if_fail (T_IS_CONNECTION (tcnc));
 
-  GdaMetaStruct *mstruct;
-
   g_message ("Updating meta data for: %s", t_connection_get_name (tcnc));
 
        t_connection_set_busy_state (tcnc, TRUE, _("Getting database schema information"));
diff --git a/tools/common/web-server.c b/tools/common/web-server.c
index 47719e9ae..7bd2e889e 100644
--- a/tools/common/web-server.c
+++ b/tools/common/web-server.c
@@ -522,7 +522,7 @@ get_auth (WebServer *server, SoupMessage *msg, GHashTable *query)
                        gchar *md5str;
                        
                        md5str = g_compute_hmac_for_string (G_CHECKSUM_MD5,
-                                                           server->priv->token, strlen (server->priv->token),
+                                                           (const guchar*) server->priv->token, strlen 
(server->priv->token),
                                                            ts->string, -1);
                        
                        if (!strcmp (md5str, token)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]