[libgda] Removing warnings



commit 0bc3c21f81a02edcc0eafc85758327f46b052f6c
Author: Daniel Espinosa <esodan gmail com>
Date:   Sun Sep 2 13:05:24 2018 -0500

    Removing warnings

 libgda/gda-data-select.c              | 3 ---
 libgda/gda-provider-meta.c            | 2 +-
 libgda/gda-server-provider.c          | 6 ------
 libgda/sqlite/gda-sqlite-provider.c   | 1 -
 libgda/thread-wrapper/test-worker.c   | 1 -
 providers/postgres/gda-postgres-ddl.c | 5 +++--
 tests/providers/check_postgres.c      | 1 -
 7 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/libgda/gda-data-select.c b/libgda/gda-data-select.c
index 0e1db1d84..8e006305b 100644
--- a/libgda/gda-data-select.c
+++ b/libgda/gda-data-select.c
@@ -254,9 +254,6 @@ gda_data_select_iter_set_value_at (GdaDataModelIter *iter, gint col,
                                    const GValue *value, GError **error)
 {
        GdaDataSelect *imodel;
-       gint ncols;
-       GdaHolder *holder;
-       gchar *str;
 
        g_object_get (G_OBJECT (iter), "data-model", &imodel, NULL);
        g_return_val_if_fail (imodel, FALSE);
diff --git a/libgda/gda-provider-meta.c b/libgda/gda-provider-meta.c
index 236647e80..7448c1668 100644
--- a/libgda/gda-provider-meta.c
+++ b/libgda/gda-provider-meta.c
@@ -87,7 +87,7 @@ GdaDataModel  *gda_provider_meta_execute_query (GdaProviderMeta *prov,
                  _("Connection is no opened"));
     return NULL;
   }
-  stmt = gda_connection_parse_sql_string (cnc, sql, params, error);
+  stmt = gda_connection_parse_sql_string (cnc, sql, NULL, error);
   if (stmt == NULL) {
     return NULL;
   }
diff --git a/libgda/gda-server-provider.c b/libgda/gda-server-provider.c
index 3ef16e24d..fdcfaf0dc 100644
--- a/libgda/gda-server-provider.c
+++ b/libgda/gda-server-provider.c
@@ -294,10 +294,7 @@ gda_server_provider_set_property (GObject *object,
                                  guint param_id,
                                  G_GNUC_UNUSED const GValue *value,
                                  GParamSpec *pspec) {
-        GdaServerProvider *prov;
 
-        prov = GDA_SERVER_PROVIDER (object);
-        GdaServerProviderPrivate *priv = gda_server_provider_get_instance_private (prov);
         switch (param_id) {
           default:
             G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -310,10 +307,7 @@ gda_server_provider_get_property (GObject *object,
   guint param_id,
   G_GNUC_UNUSED GValue *value,
   GParamSpec *pspec) {
-  GdaServerProvider *prov;
 
-  prov = GDA_SERVER_PROVIDER (object);
-  GdaServerProviderPrivate *priv = gda_server_provider_get_instance_private (prov);
   switch (param_id) {
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index e253ccecc..770b9fe8c 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -786,7 +786,6 @@ gda_sqlite_provider_set_property (GObject      *object,
                           GParamSpec   *pspec)
 {
 
-  GdaConnection *cnc;
   GdaSqliteProvider *prov = GDA_SQLITE_PROVIDER (object);
   GdaSqliteProviderPrivate *priv = gda_sqlite_provider_get_instance_private (prov);
   switch (property_id) {
diff --git a/libgda/thread-wrapper/test-worker.c b/libgda/thread-wrapper/test-worker.c
index 73d86a4f6..0dbfffbc3 100644
--- a/libgda/thread-wrapper/test-worker.c
+++ b/libgda/thread-wrapper/test-worker.c
@@ -632,7 +632,6 @@ test9 (void)
        gint nfailed = 0;
 
        worker = gda_worker_new ();
-       GError *error = NULL;
 
 #define NB_THREADS 2
        GThread *threads[NB_THREADS];
diff --git a/providers/postgres/gda-postgres-ddl.c b/providers/postgres/gda-postgres-ddl.c
index f89d8d635..11f5a783e 100644
--- a/providers/postgres/gda-postgres-ddl.c
+++ b/providers/postgres/gda-postgres-ddl.c
@@ -108,13 +108,14 @@ gda_postgres_render_DROP_DB (GdaServerProvider *provider, GdaConnection *cnc,
        return sql;     
 }
 
+/*FIXME: Add error messages  */
 gchar *
 gda_postgres_render_CREATE_TABLE (GdaServerProvider *provider, GdaConnection *cnc, 
                                  GdaServerOperation *op, GError **error)
 {
        GString *string;
        const GValue *value;
-       const GValue *value1;
+       const GValue *value1 = NULL;
        gboolean hasfields = FALSE;
        gint nrows;
        gint i;
@@ -204,7 +205,7 @@ gda_postgres_render_CREATE_TABLE (GdaServerProvider *provider, GdaConnection *cn
                }
 
                value = gda_server_operation_get_value_at (op, "/FIELDS_A/@COLUMN_DEFAULT/%d", i);
-               if (value && G_VALUE_HOLDS (value, G_TYPE_STRING)) {
+               if (value && G_VALUE_HOLDS (value, G_TYPE_STRING) && value1 != NULL) {
                        const gchar *str = g_value_get_string (value);
                        if (str && *str) {
                                g_string_append (string, " DEFAULT ");
diff --git a/tests/providers/check_postgres.c b/tests/providers/check_postgres.c
index fe3bad58b..4d750810b 100644
--- a/tests/providers/check_postgres.c
+++ b/tests/providers/check_postgres.c
@@ -77,7 +77,6 @@ test_timestamp_change_format (void)
        GdaStatement *stmt = NULL;
        GError *error = NULL;
        int number_failed = 0;
-       GdaDataModel *model = NULL;
        GValue *value = NULL;
 
 #ifdef CHECK_EXTRA_INFO


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