[libgda] Fix unused generated code warning
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Fix unused generated code warning
- Date: Fri, 22 Feb 2019 22:08:54 +0000 (UTC)
commit db0205e2b0fe13b05445098c25026e5b2cbd0cdb
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Fri Feb 22 12:27:21 2019 -0600
Fix unused generated code warning
libgda/Makefile.am | 1 +
libgda/gda-data-meta-wrapper.c | 6 +++--
libgda/gda-util.c | 3 +++
libgda/meson.build | 6 -----
libgda/sqlite/gda-sqlite-util.c | 5 +++-
libgda/sqlite/meson.build | 6 +++++
.../reuseable/postgres/gda-postgres-reuseable.c | 27 +++++++++++++---------
providers/skel-implementation/capi/gda-capi-meta.c | 4 ++++
8 files changed, 38 insertions(+), 20 deletions(-)
---
diff --git a/libgda/Makefile.am b/libgda/Makefile.am
index a9c61488f..b72fff2e2 100644
--- a/libgda/Makefile.am
+++ b/libgda/Makefile.am
@@ -28,6 +28,7 @@ GLOBAL_CFLAGS = \
-I$(top_srcdir)/libgda \
-I$(top_builddir)/libgda/sqlite \
-I$(top_builddir)/libgda \
+ -Wall \
-DABI_VERSION=\""$(GDA_ABI_VERSION)"\" \
$(COREDEPS_CFLAGS) \
$(BDB_CFLAGS) \
diff --git a/libgda/gda-data-meta-wrapper.c b/libgda/gda-data-meta-wrapper.c
index 24bc14a3a..961b2f206 100644
--- a/libgda/gda-data-meta-wrapper.c
+++ b/libgda/gda-data-meta-wrapper.c
@@ -80,7 +80,7 @@ struct _GdaDataMetaWrapperPrivate {
/* properties */
enum
{
- PROP_0,
+ PROP_0,
PROP_MODEL,
};
@@ -169,7 +169,9 @@ gda_data_meta_wrapper_class_init (GdaDataMetaWrapperClass *klass)
/* virtual functions */
object_class->dispose = gda_data_meta_wrapper_dispose;
object_class->finalize = gda_data_meta_wrapper_finalize;
-
+#ifdef GDA_DEBUG
+ test_keywords ();
+#endif
}
static void
diff --git a/libgda/gda-util.c b/libgda/gda-util.c
index 7b9f40fc1..0b6188a6e 100644
--- a/libgda/gda-util.c
+++ b/libgda/gda-util.c
@@ -2545,6 +2545,9 @@ gchar *
gda_sql_identifier_quote (const gchar *id, GdaConnection *cnc, GdaServerProvider *prov,
gboolean for_meta_store, gboolean force_quotes)
{
+#if GDA_DEBUG
+ test_keywords ();
+#endif
g_return_val_if_fail (id && *id, NULL);
if (prov)
g_return_val_if_fail (GDA_IS_SERVER_PROVIDER (prov), NULL);
diff --git a/libgda/meson.build b/libgda/meson.build
index 57db9387d..02ea1030e 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -45,12 +45,6 @@ gda_enum_headers = files ([
gda_enums = gnome_module.mkenums_simple('gda-enum-types', sources: gda_enum_headers)
-mkkeywordhashf = files([
- 'sqlite/mkkeywordhash.c'
-])
-
-mkkeywordhash = executable ('mkkeywordhash', mkkeywordhashf)
-
gda_keywordshash = custom_target('keywords_hash',
command: [
mkkeywordhash,
diff --git a/libgda/sqlite/gda-sqlite-util.c b/libgda/sqlite/gda-sqlite-util.c
index 12638804b..e80a87003 100644
--- a/libgda/sqlite/gda-sqlite-util.c
+++ b/libgda/sqlite/gda-sqlite-util.c
@@ -168,7 +168,10 @@ _gda_sqlite_compute_g_type (int sqlite_type)
GdaSqlReservedKeywordsFunc
_gda_sqlite_get_reserved_keyword_func (void)
{
- return is_keyword;
+#ifdef GDA_DEBUG
+ test_keywords ();
+#endif
+ return is_keyword;
}
static gchar *
diff --git a/libgda/sqlite/meson.build b/libgda/sqlite/meson.build
index 0bbb550c1..6e7186fc4 100644
--- a/libgda/sqlite/meson.build
+++ b/libgda/sqlite/meson.build
@@ -1,3 +1,9 @@
+mkkeywordhashf = files([
+ 'mkkeywordhash.c'
+])
+
+mkkeywordhash = executable ('mkkeywordhash', mkkeywordhashf)
+
if sqlite_internal
subdir('sqlite-src')
endif
diff --git a/providers/reuseable/postgres/gda-postgres-reuseable.c
b/providers/reuseable/postgres/gda-postgres-reuseable.c
index e0e358d43..6dadb9e58 100644
--- a/providers/reuseable/postgres/gda-postgres-reuseable.c
+++ b/providers/reuseable/postgres/gda-postgres-reuseable.c
@@ -484,18 +484,23 @@ _gda_postgres_reuseable_get_reserved_keywords_func (GdaProviderReuseable *rdata)
{
if (rdata) {
switch (rdata->major) {
- case 8:
- if (rdata->minor == 2)
- return V82is_keyword;
- if (rdata->minor == 3)
- return V83is_keyword;
+ case 8:
+#ifdef GDA_DEBUG
+ V82test_keywords ();
+ V83test_keywords ();
+ V84test_keywords ();
+#endif
+ if (rdata->minor == 2)
+ return V82is_keyword;
+ if (rdata->minor == 3)
+ return V83is_keyword;
if (rdata->minor == 4)
- return V84is_keyword;
- return V84is_keyword;
- default:
- return V84is_keyword;
- break;
- }
+ return V84is_keyword;
+ return V84is_keyword;
+ default:
+ return V84is_keyword;
+ break;
+ }
}
return V84is_keyword;
}
diff --git a/providers/skel-implementation/capi/gda-capi-meta.c
b/providers/skel-implementation/capi/gda-capi-meta.c
index 4aaee54bf..576b62780 100644
--- a/providers/skel-implementation/capi/gda-capi-meta.c
+++ b/providers/skel-implementation/capi/gda-capi-meta.c
@@ -88,6 +88,10 @@ _gda_capi_provider_meta_init (GdaServerProvider *provider)
"name2", G_TYPE_STRING, "");
}
+#ifdef GDA_DEBUG
+ test_keywords ();
+#endif
+
g_mutex_unlock (&init_mutex);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]