[libgda: 5/15] Unused variable removed or marked as unused
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 5/15] Unused variable removed or marked as unused
- Date: Fri, 11 Jan 2019 19:48:51 +0000 (UTC)
commit 691b02e7d8f310c2397dbda693c798df362b1f35
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Wed Jan 2 22:18:32 2019 -0600
Unused variable removed or marked as unused
libgda/gda-connection.c | 1 -
libgda/gda-data-handler.c | 1 -
libgda/gda-holder.c | 6 +-
libgda/gda-lockable.c | 1 -
libgda/sqlite/gda-sqlite-ddl.c | 17 +++---
libgda/sqlite/gda-sqlite-handler-bin.c | 4 +-
libgda/sqlite/gda-sqlite-meta.c | 6 +-
libgda/sqlite/gda-sqlite-provider.c | 77 ++++++++++--------------
libgda/sqlite/virtual/gda-vprovider-data-model.c | 11 ++--
providers/postgres/gda-postgres-ddl.c | 1 -
10 files changed, 55 insertions(+), 70 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index bddd10cd5..ec1c34898 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -468,7 +468,6 @@ gda_connection_init (GdaConnection *cnc)
}
static void auto_update_meta_context_free (GdaMetaContext *context);
-static void prepared_stms_foreach_func (GdaStatement *gda_stmt, GdaPStmt *prepared_stmt, GdaConnection *cnc);
static void
gda_connection_dispose (GObject *object)
{
diff --git a/libgda/gda-data-handler.c b/libgda/gda-data-handler.c
index a50442edd..e7d332dc5 100644
--- a/libgda/gda-data-handler.c
+++ b/libgda/gda-data-handler.c
@@ -30,7 +30,6 @@
#include "handlers/gda-handler-time.h"
#include "handlers/gda-handler-type.h"
-static GRecMutex init_rmutex;
#define MUTEX_LOCK() g_rec_mutex_lock(&init_rmutex)
#define MUTEX_UNLOCK() g_rec_mutex_unlock(&init_rmutex)
G_DEFINE_INTERFACE (GdaDataHandler, gda_data_handler, G_TYPE_OBJECT)
diff --git a/libgda/gda-holder.c b/libgda/gda-holder.c
index d2e23e410..781244ac6 100644
--- a/libgda/gda-holder.c
+++ b/libgda/gda-holder.c
@@ -848,7 +848,6 @@ gboolean
gda_holder_set_value (GdaHolder *holder, const GValue *value, GError **error)
{
g_return_val_if_fail (GDA_IS_HOLDER (holder), FALSE);
- GdaHolderPrivate *priv = gda_holder_get_instance_private (holder);
return real_gda_holder_set_value (holder, (GValue*) value, TRUE, error);
}
@@ -1736,8 +1735,9 @@ gda_holder_set_bind (GdaHolder *holder, GdaHolder *bind_to, GError **error)
const GValue *cvalue;
GValue *value1 = NULL;
const GValue *value2 = NULL;
- GdaHolderPrivate *priv, *bpriv;
-
+ GdaHolderPrivate *priv = NULL;
+ GdaHolderPrivate *bpriv = NULL;
+
g_return_val_if_fail (GDA_IS_HOLDER (holder), FALSE);
priv = gda_holder_get_instance_private (holder);
g_return_val_if_fail (holder != bind_to, FALSE);
diff --git a/libgda/gda-lockable.c b/libgda/gda-lockable.c
index 1946c4c45..d22bbf517 100644
--- a/libgda/gda-lockable.c
+++ b/libgda/gda-lockable.c
@@ -20,7 +20,6 @@
#include <libgda/gda-lockable.h>
-static GRecMutex init_rmutex;
#define MUTEX_LOCK() g_rec_mutex_lock(&init_rmutex)
#define MUTEX_UNLOCK() g_rec_mutex_unlock(&init_rmutex)
diff --git a/libgda/sqlite/gda-sqlite-ddl.c b/libgda/sqlite/gda-sqlite-ddl.c
index 260d2847d..70639e747 100644
--- a/libgda/sqlite/gda-sqlite-ddl.c
+++ b/libgda/sqlite/gda-sqlite-ddl.c
@@ -245,8 +245,7 @@ _gda_sqlite_render_CREATE_TABLE (GdaServerProvider *provider, GdaConnection *cnc
g_string_append (string, conflict_algo);
}
}
- g_slist_foreach (pkfields, (GFunc) g_free, NULL);
- g_slist_free (pkfields);
+ g_slist_free_full (pkfields, (GDestroyNotify) g_free);
node = gda_server_operation_get_node_info (op, "/FKEY_S");
if (node) {
@@ -342,7 +341,7 @@ _gda_sqlite_render_CREATE_TABLE (GdaServerProvider *provider, GdaConnection *cnc
}
gchar *
-_gda_sqlite_render_DROP_TABLE (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_DROP_TABLE (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, GError **error)
{
GString *string;
@@ -373,7 +372,7 @@ _gda_sqlite_render_DROP_TABLE (GdaServerProvider *provider, GdaConnection *cnc,
}
gchar *
-_gda_sqlite_render_RENAME_TABLE (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_RENAME_TABLE (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, GError **error)
{
GString *string;
@@ -407,7 +406,7 @@ _gda_sqlite_render_RENAME_TABLE (GdaServerProvider *provider, GdaConnection *cnc
}
gchar *
-_gda_sqlite_render_ADD_COLUMN (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_ADD_COLUMN (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED GError **error)
{
GString *string;
@@ -483,7 +482,7 @@ _gda_sqlite_render_ADD_COLUMN (GdaServerProvider *provider, GdaConnection *cnc,
gchar *
-_gda_sqlite_render_CREATE_INDEX (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_CREATE_INDEX (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED GError **error)
{
GString *string;
@@ -576,7 +575,7 @@ _gda_sqlite_render_CREATE_INDEX (GdaServerProvider *provider, GdaConnection *cnc
}
gchar *
-_gda_sqlite_render_DROP_INDEX (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_DROP_INDEX (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED GError **error)
{
GString *string;
@@ -606,7 +605,7 @@ _gda_sqlite_render_DROP_INDEX (GdaServerProvider *provider, GdaConnection *cnc,
}
gchar *
-_gda_sqlite_render_CREATE_VIEW (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_CREATE_VIEW (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED GError **error)
{
GString *string;
@@ -654,7 +653,7 @@ _gda_sqlite_render_CREATE_VIEW (GdaServerProvider *provider, GdaConnection *cnc,
}
gchar *
-_gda_sqlite_render_DROP_VIEW (GdaServerProvider *provider, GdaConnection *cnc,
+_gda_sqlite_render_DROP_VIEW (G_GNUC_UNUSED GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperation *op, G_GNUC_UNUSED GError **error)
{
GString *string;
diff --git a/libgda/sqlite/gda-sqlite-handler-bin.c b/libgda/sqlite/gda-sqlite-handler-bin.c
index ed3c17a4f..86683253f 100644
--- a/libgda/sqlite/gda-sqlite-handler-bin.c
+++ b/libgda/sqlite/gda-sqlite-handler-bin.c
@@ -228,7 +228,7 @@ static int hex_to_int (int h) {
}
static GValue *
-gda_sqlite_handler_bin_get_value_from_sql (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *sql, GType type)
+gda_sqlite_handler_bin_get_value_from_sql (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *sql,
G_GNUC_UNUSED GType type)
{
g_assert (sql);
GValue *value = NULL;
@@ -261,7 +261,7 @@ gda_sqlite_handler_bin_get_value_from_sql (G_GNUC_UNUSED GdaDataHandler *iface,
}
static GValue *
-gda_sqlite_handler_bin_get_value_from_str (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *str, GType type)
+gda_sqlite_handler_bin_get_value_from_str (G_GNUC_UNUSED GdaDataHandler *iface, const gchar *str,
G_GNUC_UNUSED GType type)
{
g_assert (str);
diff --git a/libgda/sqlite/gda-sqlite-meta.c b/libgda/sqlite/gda-sqlite-meta.c
index c190a8c5d..56ca38d41 100644
--- a/libgda/sqlite/gda-sqlite-meta.c
+++ b/libgda/sqlite/gda-sqlite-meta.c
@@ -2253,10 +2253,10 @@ fill_routines (GdaDataModel *mod_model,
#endif
gboolean
-_gda_sqlite_meta_routines (G_GNUC_UNUSED GdaServerProvider *prov, GdaConnection *cnc,
- GdaMetaStore *store, GdaMetaContext *context, GError **error,
+_gda_sqlite_meta_routines (G_GNUC_UNUSED GdaServerProvider *prov, G_GNUC_UNUSED GdaConnection *cnc,
+ G_GNUC_UNUSED GdaMetaStore *store, G_GNUC_UNUSED GdaMetaContext *context,
G_GNUC_UNUSED GError **error,
G_GNUC_UNUSED const GValue *routine_catalog,
- G_GNUC_UNUSED const GValue *routine_schema, const GValue *routine_name_n)
+ G_GNUC_UNUSED const GValue *routine_schema, G_GNUC_UNUSED const GValue
*routine_name_n)
{
gboolean retval = TRUE;
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index 4ccd55995..bb79e6e25 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -61,7 +61,7 @@
#include <libgda/binreloc/gda-binreloc.h>
#include <libgda/gda-set.h>
#include <libgda/gda-statement-extra.h>
-#include <sql-parser/gda-sql-parser.h>
+#include <libgda/sql-parser/gda-sql-parser.h>
#include <stdio.h>
#define _GDA_PSTMT(x) ((GdaPStmt*)(x))
#include <libgda/gda-debug-macros.h>
@@ -870,15 +870,11 @@ enum {
static void
-gda_sqlite_provider_get_property (GObject *object,
+gda_sqlite_provider_get_property (G_GNUC_UNUSED GObject *object,
guint property_id,
GValue *value,
- GParamSpec *pspec)
+ G_GNUC_UNUSED GParamSpec *pspec)
{
-
- GdaConnection *cnc;
- GdaSqliteProvider *prov = GDA_SQLITE_PROVIDER (object);
- GdaSqliteProviderPrivate *priv = gda_sqlite_provider_get_instance_private (prov);
switch (property_id) {
case PROP_CONNECTION:
g_value_set_object (value, NULL);
@@ -887,14 +883,11 @@ gda_sqlite_provider_get_property (GObject *object,
}
static void
-gda_sqlite_provider_set_property (GObject *object,
+gda_sqlite_provider_set_property (G_GNUC_UNUSED GObject *object,
guint property_id,
- const GValue *value,
- GParamSpec *pspec)
+ G_GNUC_UNUSED const GValue *value,
+ G_GNUC_UNUSED GParamSpec *pspec)
{
- GdaConnection *cnc = NULL;
- GdaSqliteProvider *prov = GDA_SQLITE_PROVIDER (object);
- GdaSqliteProviderPrivate *priv = gda_sqlite_provider_get_instance_private (prov);
switch (property_id) {
case PROP_CONNECTION:
break;
@@ -1018,7 +1011,7 @@ gda_sqlite_provider_get_type (void)
static GdaWorker *
-gda_sqlite_provider_create_worker (GdaServerProvider *provider, gboolean for_cnc)
+gda_sqlite_provider_create_worker (G_GNUC_UNUSED GdaServerProvider *provider, gboolean for_cnc)
{
/* see http://www.sqlite.org/threadsafe.html */
@@ -1538,7 +1531,7 @@ gda_sqlite_provider_supports_operation (G_GNUC_UNUSED GdaServerProvider *provide
static GdaServerOperation *
gda_sqlite_provider_create_operation (GdaServerProvider *provider, GdaConnection *cnc,
GdaServerOperationType type,
- G_GNUC_UNUSED GdaSet *options, GError **error)
+ G_GNUC_UNUSED GdaSet *options, G_GNUC_UNUSED GError **error)
{
gchar *file;
GdaServerOperation *op;
@@ -2067,7 +2060,7 @@ gda_sqlite_provider_supports_feature (GdaServerProvider *provider,
*/
static GdaDataHandler *
gda_sqlite_provider_get_data_handler (GdaServerProvider *provider, GdaConnection *cnc,
- GType type, const gchar *dbms_type)
+ GType type, G_GNUC_UNUSED const gchar *dbms_type)
{
GdaDataHandler *dh = NULL;
@@ -2970,8 +2963,7 @@ real_prepare (GdaServerProvider *provider, GdaConnection *cnc, GdaStatement *stm
else {
g_set_error (error, GDA_SERVER_PROVIDER_ERROR,
GDA_SERVER_PROVIDER_PREPARE_STMT_ERROR,
"%s", _("Unnamed parameter is not allowed in prepared
statements"));
- g_slist_foreach (param_ids, (GFunc) g_free, NULL);
- g_slist_free (param_ids);
+ g_slist_free_full (param_ids, (GDestroyNotify) g_free);
goto out_err;
}
}
@@ -3151,8 +3143,7 @@ make_last_inserted_set (GdaConnection *cnc, GdaStatement *stmt, sqlite3_int64 la
cvalue = gda_data_model_get_value_at (model, i, 0, NULL);
if (!cvalue || !gda_holder_set_value (h, cvalue, NULL)) {
if (holders) {
- g_slist_foreach (holders, (GFunc) g_object_unref, NULL);
- g_slist_free (holders);
+ g_slist_free_full (holders, (GDestroyNotify) g_object_unref);
holders = NULL;
}
break;
@@ -3164,8 +3155,7 @@ make_last_inserted_set (GdaConnection *cnc, GdaStatement *stmt, sqlite3_int64 la
if (holders) {
holders = g_slist_reverse (holders);
set = gda_set_new_read_only (holders);
- g_slist_foreach (holders, (GFunc) g_object_unref, NULL);
- g_slist_free (holders);
+ g_slist_free_full (holders, (GDestroyNotify) g_object_unref);
}
return set;
@@ -3566,8 +3556,7 @@ gda_sqlite_provider_statement_execute (GdaServerProvider *provider, GdaConnectio
col_types,
last_inserted_row, error);
/* clear original @param_ids and restore copied one */
- g_slist_foreach (prep_param_ids, (GFunc) g_free, NULL);
- g_slist_free (prep_param_ids);
+ g_slist_free_full (prep_param_ids, (GDestroyNotify) g_free);
gtps->param_ids = copied_param_ids;
@@ -4414,7 +4403,7 @@ gda_sqlite_provider_unescape_string (G_GNUC_UNUSED GdaServerProvider *provider,
static GdaDataModel*
gda_sqlite_provider_meta_btypes (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4422,7 +4411,7 @@ gda_sqlite_provider_meta_btypes (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_udts (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4430,8 +4419,8 @@ gda_sqlite_provider_meta_udts (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_udt (GdaProviderMeta *prov,
- const gchar *udt_catalog, const gchar *udt_schema,
- GError **error)
+ G_GNUC_UNUSED const gchar *udt_catalog, G_GNUC_UNUSED const gchar *udt_schema,
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4439,7 +4428,7 @@ gda_sqlite_provider_meta_udt (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_udt_cols (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4447,8 +4436,8 @@ gda_sqlite_provider_meta_udt_cols (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_udt_col (GdaProviderMeta *prov,
- const gchar *udt_catalog, const gchar *udt_schema,
- const gchar *udt_name, GError **error)
+ G_GNUC_UNUSED const gchar *udt_catalog, G_GNUC_UNUSED const gchar *udt_schema,
+ G_GNUC_UNUSED const gchar *udt_name, GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4456,7 +4445,7 @@ gda_sqlite_provider_meta_udt_col (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_enums_type (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4464,8 +4453,8 @@ gda_sqlite_provider_meta_enums_type (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_enum_type (GdaProviderMeta *prov,
- const gchar *udt_catalog,
- const gchar *udt_schema, const gchar *udt_name, GError **error)
+ G_GNUC_UNUSED const gchar *udt_catalog,
+ G_GNUC_UNUSED const gchar *udt_schema, G_GNUC_UNUSED const gchar
*udt_name, GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4473,7 +4462,7 @@ gda_sqlite_provider_meta_enum_type (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_domains (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4481,7 +4470,7 @@ gda_sqlite_provider_meta_domains (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_domain (GdaProviderMeta *prov,
- const gchar *domain_catalog, const gchar *domain_schema, GError **error)
+ G_GNUC_UNUSED const gchar *domain_catalog, G_GNUC_UNUSED const gchar
*domain_schema, GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4489,7 +4478,7 @@ gda_sqlite_provider_meta_domain (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_domains_constraints (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4497,8 +4486,8 @@ gda_sqlite_provider_meta_domains_constraints (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_domain_constraints (GdaProviderMeta *prov,
- const gchar *domain_catalog, const gchar *domain_schema,
- const gchar *domain_name, GError **error)
+ G_GNUC_UNUSED const gchar *domain_catalog, G_GNUC_UNUSED const gchar
*domain_schema,
+ G_GNUC_UNUSED const gchar *domain_name, GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4506,9 +4495,9 @@ gda_sqlite_provider_meta_domain_constraints (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_domain_constraint (GdaProviderMeta *prov,
- const gchar *domain_catalog, const gchar *domain_schema,
- const gchar *domain_name, const gchar *contraint_name,
- GError **error)
+ G_GNUC_UNUSED const gchar *domain_catalog, G_GNUC_UNUSED const gchar
*domain_schema,
+ G_GNUC_UNUSED const gchar *domain_name, G_GNUC_UNUSED const gchar
*contraint_name,
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4516,7 +4505,7 @@ gda_sqlite_provider_meta_domain_constraint (GdaProviderMeta *prov,
}
static GdaDataModel*
gda_sqlite_provider_meta_element_types (GdaProviderMeta *prov,
- GError **error)
+ G_GNUC_UNUSED GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
@@ -4524,7 +4513,7 @@ gda_sqlite_provider_meta_element_types (GdaProviderMeta *prov,
}
static GdaRow*
gda_sqlite_provider_meta_element_type (GdaProviderMeta *prov,
- const gchar *specific_name, GError **error)
+ G_GNUC_UNUSED const gchar *specific_name, GError **error)
{
g_return_val_if_fail (prov, NULL);
g_return_val_if_fail (GDA_IS_PROVIDER_META (prov), NULL);
diff --git a/libgda/sqlite/virtual/gda-vprovider-data-model.c
b/libgda/sqlite/virtual/gda-vprovider-data-model.c
index ad3434792..5428b1fc6 100644
--- a/libgda/sqlite/virtual/gda-vprovider-data-model.c
+++ b/libgda/sqlite/virtual/gda-vprovider-data-model.c
@@ -30,10 +30,12 @@
#include <libgda/gda-connection-internal.h>
#include <libgda/gda-data-model-iter.h>
#include <libgda/gda-blob-op.h>
-#include <gda-sqlite.h>
-#include <sql-parser/gda-statement-struct-util.h>
+#include <libgda/sqlite/gda-sqlite.h>
+#include <libgda/sql-parser/gda-statement-struct-util.h>
#include <libgda/gda-debug-macros.h>
#include <libgda/gda-server-provider-impl.h>
+#include <libgda/gda-data-proxy.h>
+#include <libgda/gda-util.h>
/* module error */
@@ -1484,7 +1486,7 @@ param_name_to_number (gint maxrows, const gchar *str)
* optype value: see virtualUpdate()
*/
static int
-update_data_select_model (sqlite3_vtab *tab, gint optype, int nData, sqlite3_value **apData)
+update_data_select_model (sqlite3_vtab *tab, gint optype, G_GNUC_UNUSED int nData, sqlite3_value **apData)
{
VirtualTable *vtable = (VirtualTable *) tab;
@@ -1743,8 +1745,7 @@ virtualUpdate (sqlite3_vtab *tab, int nData, sqlite3_value **apData, sqlite_int6
values = g_list_reverse (values);
newrow = gda_data_model_append_values (vtable->td->real_model, values, NULL);
- g_list_foreach (values, (GFunc) gda_value_free, NULL);
- g_list_free (values);
+ g_list_free_full (values, (GDestroyNotify) gda_value_free);
if (newrow < 0)
return SQLITE_READONLY;
diff --git a/providers/postgres/gda-postgres-ddl.c b/providers/postgres/gda-postgres-ddl.c
index bda319312..e8ca3d48e 100644
--- a/providers/postgres/gda-postgres-ddl.c
+++ b/providers/postgres/gda-postgres-ddl.c
@@ -32,7 +32,6 @@ gda_postgres_render_CREATE_DB (GdaServerProvider *provider, GdaConnection *cnc,
GString *string;
const GValue *value;
gchar *sql = NULL;
- gchar *tmp;
string = g_string_new ("CREATE DATABASE ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]