[libgda: 9/15] Fix warning for incorect function pointer
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda: 9/15] Fix warning for incorect function pointer
- Date: Fri, 11 Jan 2019 19:49:11 +0000 (UTC)
commit 18d1d5621b9343026a1e8a4370dfd0cb7447807a
Author: Pavlo Solntsev <p sun fun gmail com>
Date: Wed Jan 2 22:40:21 2019 -0600
Fix warning for incorect function pointer
libgda/sqlite/virtual/gda-ldap-connection.c | 10 ++++------
libgda/sqlite/virtual/gda-vconnection-hub.c | 5 +++--
libgda/sqlite/virtual/gda-virtual-connection.c | 2 +-
3 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/libgda/sqlite/virtual/gda-ldap-connection.c b/libgda/sqlite/virtual/gda-ldap-connection.c
index 6479269c3..de770b9aa 100644
--- a/libgda/sqlite/virtual/gda-ldap-connection.c
+++ b/libgda/sqlite/virtual/gda-ldap-connection.c
@@ -47,10 +47,9 @@ _ldap_table_map_free (LdapTableMap *map)
g_free (map->base_dn);
g_free (map->filter);
g_free (map->attributes);
- if (map->columns) {
- g_list_foreach (map->columns, (GFunc) g_object_unref, NULL);
- g_list_free (map->columns);
- }
+ if (map->columns)
+ g_list_free_full (map->columns, (GDestroyNotify) g_object_unref);
+
if (map->filters_hash)
g_hash_table_destroy (map->filters_hash);
g_free (map);
@@ -243,8 +242,7 @@ conn_opened_cb (GdaLdapConnection *cnc, G_GNUC_UNUSED gpointer data)
if (batch) {
GSList *list;
list = gda_connection_batch_execute (GDA_CONNECTION (cnc), batch, NULL, 0, &lerror);
- g_slist_foreach (list, (GFunc) g_object_unref, NULL);
- g_slist_free (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
g_object_unref (batch);
}
if (lerror) {
diff --git a/libgda/sqlite/virtual/gda-vconnection-hub.c b/libgda/sqlite/virtual/gda-vconnection-hub.c
index e7e09914a..f056d46a1 100644
--- a/libgda/sqlite/virtual/gda-vconnection-hub.c
+++ b/libgda/sqlite/virtual/gda-vconnection-hub.c
@@ -25,12 +25,13 @@
#include <string.h>
#include "gda-vconnection-hub.h"
#include "gda-virtual-provider.h"
-#include <sql-parser/gda-sql-parser.h>
+#include <libgda/sql-parser/gda-sql-parser.h>
#include <libgda/gda-util.h>
#include <libgda/gda-data-select.h>
-#include <gda-sql-builder.h>
+#include <libgda/gda-sql-builder.h>
#include "../gda-sqlite.h"
#include <libgda/gda-connection-internal.h>
+#include <libgda/gda-log.h>
typedef struct {
GdaVconnectionHub *hub;
diff --git a/libgda/sqlite/virtual/gda-virtual-connection.c b/libgda/sqlite/virtual/gda-virtual-connection.c
index 0221d0a6d..36c645187 100644
--- a/libgda/sqlite/virtual/gda-virtual-connection.c
+++ b/libgda/sqlite/virtual/gda-virtual-connection.c
@@ -22,7 +22,7 @@
#include <glib/gi18n-lib.h>
#include <string.h>
#include "gda-virtual-connection.h"
-#include <gda-connection-private.h>
+#include <libgda/gda-connection-private.h>
#include <libgda/gda-server-provider-private.h>
#include <libgda/gda-connection-internal.h>
#include <libgda/gda-debug-macros.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]