[libgda] Avoid warnings about const correctness.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Avoid warnings about const correctness.
- Date: Sun, 29 Oct 2017 21:57:40 +0000 (UTC)
commit 0a68a7973829b4fcb68fac16355185027b82619f
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Oct 29 21:39:43 2017 +0100
Avoid warnings about const correctness.
libgda/gda-data-pivot.c | 2 +-
libgda/gda-xa-transaction.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libgda/gda-data-pivot.c b/libgda/gda-data-pivot.c
index a2896c2..4dfaef0 100644
--- a/libgda/gda-data-pivot.c
+++ b/libgda/gda-data-pivot.c
@@ -2031,7 +2031,7 @@ _gda_value_hash (gconstpointer key)
res += g_str_hash (tmp);
}
else if ((vt == GDA_TYPE_BINARY) || (vt == GDA_TYPE_BLOB)) {
- const GdaBinary *bin;
+ GdaBinary *bin;
if (vt == GDA_TYPE_BLOB) {
GdaBlob *blob;
blob = (GdaBlob*) gda_value_get_blob ((GValue *) v);
diff --git a/libgda/gda-xa-transaction.c b/libgda/gda-xa-transaction.c
index d6bb8b0..4f34abf 100644
--- a/libgda/gda-xa-transaction.c
+++ b/libgda/gda-xa-transaction.c
@@ -99,7 +99,7 @@ gda_xa_transaction_init (GdaXaTransaction *xa_trans, G_GNUC_UNUSED GdaXaTransact
xa_trans->priv->xid.gtrid_length = 0;
xa_trans->priv->xid.bqual_length = 0;
- xa_trans->priv->cnc_hash = g_hash_table_new_full (NULL, NULL, NULL, gda_binary_free);
+ xa_trans->priv->cnc_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify)gda_binary_free);
xa_trans->priv->cnc_list = NULL;
xa_trans->priv->non_xa_cnc = NULL;
}
@@ -383,7 +383,7 @@ gda_xa_transaction_begin (GdaXaTransaction *xa_trans, GError **error)
cnc = GDA_CONNECTION (list->data);
prov = gda_connection_get_provider (cnc);
if (cnc != xa_trans->priv->non_xa_cnc) {
- const GdaBinary *branch;
+ GdaBinary *branch;
branch = g_hash_table_lookup (xa_trans->priv->cnc_hash, cnc);
memcpy (xa_trans->priv->xid.data + xa_trans->priv->xid.gtrid_length, /* Flawfinder:
ignore */
gda_binary_get_data (branch), gda_binary_get_size (branch));
@@ -407,7 +407,7 @@ gda_xa_transaction_begin (GdaXaTransaction *xa_trans, GError **error)
cnc = GDA_CONNECTION (list->data);
prov = gda_connection_get_provider (cnc);
if (cnc != xa_trans->priv->non_xa_cnc) {
- const GdaBinary *branch;
+ GdaBinary *branch;
branch = g_hash_table_lookup (xa_trans->priv->cnc_hash, cnc);
memcpy (xa_trans->priv->xid.data + xa_trans->priv->xid.gtrid_length, /*
Flawfinder: ignore */
gda_binary_get_data (branch), gda_binary_get_size (branch));
@@ -457,7 +457,7 @@ gda_xa_transaction_commit (GdaXaTransaction *xa_trans, GSList **cnc_to_recover,
for (list = xa_trans->priv->cnc_list; list; list = list->next) {
GdaConnection *cnc = NULL;
GdaServerProvider *prov;
- const GdaBinary *branch;
+ GdaBinary *branch;
if (cnc == xa_trans->priv->non_xa_cnc)
continue;
@@ -484,7 +484,7 @@ gda_xa_transaction_commit (GdaXaTransaction *xa_trans, GSList **cnc_to_recover,
if (cnc == xa_trans->priv->non_xa_cnc)
gda_connection_rollback_transaction (cnc, NULL, NULL);
else {
- const GdaBinary *branch;
+ GdaBinary *branch;
cnc = GDA_CONNECTION (list->data);
prov = gda_connection_get_provider (cnc);
branch = g_hash_table_lookup (xa_trans->priv->cnc_hash, cnc);
@@ -509,7 +509,7 @@ gda_xa_transaction_commit (GdaXaTransaction *xa_trans, GSList **cnc_to_recover,
if (cnc == xa_trans->priv->non_xa_cnc)
gda_connection_rollback_transaction (cnc, NULL, NULL);
else {
- const GdaBinary *branch;
+ GdaBinary *branch;
cnc = GDA_CONNECTION (list->data);
prov = gda_connection_get_provider (cnc);
branch = g_hash_table_lookup (xa_trans->priv->cnc_hash, cnc);
@@ -524,7 +524,7 @@ gda_xa_transaction_commit (GdaXaTransaction *xa_trans, GSList **cnc_to_recover,
for (list = xa_trans->priv->cnc_list; list; list = list->next) {
GdaConnection *cnc = NULL;
GdaServerProvider *prov;
- const GdaBinary *branch;
+ GdaBinary *branch;
if (cnc == xa_trans->priv->non_xa_cnc)
continue;
@@ -567,7 +567,7 @@ gda_xa_transaction_rollback (GdaXaTransaction *xa_trans, GError **error)
if (cnc == xa_trans->priv->non_xa_cnc)
gda_connection_rollback_transaction (cnc, NULL, NULL);
else {
- const GdaBinary *branch;
+ GdaBinary *branch;
branch = g_hash_table_lookup (xa_trans->priv->cnc_hash, cnc);
memcpy (xa_trans->priv->xid.data + xa_trans->priv->xid.gtrid_length, /* Flawfinder:
ignore */
gda_binary_get_data (branch), gda_binary_get_size (branch));
@@ -616,7 +616,7 @@ gda_xa_transaction_commit_recovered (GdaXaTransaction *xa_trans, GSList **cnc_to
else {
GList *recov_xid_list;
- const GdaBinary *branch;
+ GdaBinary *branch;
GList *xlist;
gboolean commit_needed = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]