[libgda] Remove warnings by applying flags
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Remove warnings by applying flags
- Date: Tue, 9 Apr 2019 15:08:00 +0000 (UTC)
commit 8f59f46089085f2a318b03561c5c628c49293e91
Author: Daniel Espinosa <esodan gmail com>
Date: Tue Apr 9 09:30:09 2019 -0500
Remove warnings by applying flags
libgda/meson.build | 11 ++++----
libgda/sql-parser/gen_def.c | 2 +-
libgda/sql-parser/lemon.c | 4 +--
libgda/test-cnc-exec.c | 2 +-
libgda/test-cnc-meta.c | 2 +-
libgda/test-cnc-open.c | 4 +--
libgda/thread-wrapper/background.c | 4 +--
libgda/thread-wrapper/gda-connect.c | 4 +--
libgda/thread-wrapper/gda-worker.c | 2 +-
libgda/thread-wrapper/itsignaler.c | 8 +++---
libgda/thread-wrapper/test-blocking-itsignaler.c | 2 +-
libgda/thread-wrapper/test-itsignaler.c | 2 +-
libgda/thread-wrapper/test-raw-itsignaler.c | 2 +-
libgda/thread-wrapper/test-worker.c | 34 ++++++++++++------------
meson.build | 13 ++++++---
providers/oracle/gen_def.c | 2 +-
providers/reuseable/mysql/gen_def.c | 2 +-
providers/reuseable/postgres/gen_def.c | 2 +-
providers/skel-implementation/capi/gen_def.c | 2 +-
tests/data-model-errors.c | 8 +++---
tests/data-models/check_data_proxy.c | 8 +++---
tests/data-models/check_data_select_iter.c | 6 ++---
tests/data-models/check_empty_rs.c | 2 +-
tests/data-models/check_model_errors.c | 6 ++---
tests/data-models/check_pivot.c | 2 +-
tests/data-models/check_pmodel.c | 4 +--
tests/data-models/check_vcnc.c | 4 +--
tests/data-models/check_virtual.c | 2 +-
tests/db/check-db-base.c | 14 +++++-----
tests/db/check-db-catalog-postgresql.c | 6 ++---
tests/db/check-db-catalog.c | 18 ++++++-------
tests/db/check-db-column.c | 24 ++++++++---------
tests/db/check-db-db-create.c | 6 ++---
tests/db/check-db-fkey.c | 8 +++---
tests/db/check-db-view.c | 14 +++++-----
tests/meson.build | 4 +--
tests/meta-store/check_meta_store_memory.c | 2 +-
tests/meta-store/check_meta_store_mysql.c | 2 +-
tests/meta-store/check_meta_store_postgresql.c | 2 +-
tests/meta-store/check_meta_store_sqlite.c | 2 +-
tests/meta-store/common.c | 4 +--
tests/multi-threading/check_cnc_lock.c | 4 +--
tests/multi-threading/check_parser.c | 4 +--
tests/parser/check_dml_comp.c | 2 +-
tests/parser/check_normalization.c | 2 +-
tests/parser/check_parser.c | 2 +-
tests/parser/check_script.c | 2 +-
tests/parser/check_validation.c | 2 +-
tests/providers/check_mysql.c | 2 +-
tests/providers/check_postgres.c | 2 +-
tests/providers/check_postgres_meta_partial-1.c | 2 +-
tests/providers/check_postgres_meta_partial-2.c | 2 +-
tests/providers/check_sqlcipher.c | 2 +-
tests/providers/check_sqlite.c | 2 +-
tests/providers/prov-test-common.c | 2 +-
tests/providers/prov-test-util.c | 2 +-
tests/test-bin-converter.c | 2 +-
tests/test-connection-string-split.c | 2 +-
tests/test-ddl-creator.c | 2 +-
tests/test-identifiers-quotes.c | 2 +-
tests/test-input-parsers.c | 2 +-
tests/test-provider-meta.c | 3 +--
tests/test-quark-list.c | 2 +-
tests/test-server-operation.c | 6 ++---
tests/test-sql-builder.c | 2 +-
tests/test-sql-identifier.c | 2 +-
tests/test-sql-renderer.c | 2 +-
tests/value-holders/check_holder.c | 4 +--
tests/value-holders/check_set.c | 7 ++---
tests/value-holders/check_statement.c | 2 +-
70 files changed, 166 insertions(+), 160 deletions(-)
---
diff --git a/libgda/meson.build b/libgda/meson.build
index 314498ea1..4e380ddfb 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -485,7 +485,7 @@ ttw = executable('test-raw-itsignaler',
test_raw_itsignaler_sources,
c_args: [
'-include',
- meson.build_root() + '/config.h',
+ 'config.h',
],
dependencies: [
libgda_dep,
@@ -500,7 +500,7 @@ ttws = executable('test-itsignaler',
test_itsignaler_sources,
c_args: [
'-include',
- meson.build_root() + '/config.h',
+ 'config.h',
],
dependencies: [
libgda_dep,
@@ -514,8 +514,7 @@ test('ItSignaler', ttws)
ttwbs = executable('test-blocking-itsignaler',
test_block_itsignaler_sources,
c_args: [
- '-include',
- meson.build_root() + '/config.h',
+ '-include','config.h',
],
dependencies: [
libgda_dep,
@@ -530,7 +529,7 @@ ttww = executable('test-worker',
test_worker_sources,
c_args: [
'-include',
- meson.build_root() + '/config.h',
+ 'config.h',
],
dependencies: [
libgda_dep,
@@ -545,7 +544,7 @@ ttwd = executable('test-connect',
test_worker_sources,
c_args: [
'-include',
- meson.build_root() + '/config.h',
+ 'config.h',
],
dependencies: [
libgda_dep,
diff --git a/libgda/sql-parser/gen_def.c b/libgda/sql-parser/gen_def.c
index 2cfea5d9a..4bcc06c38 100644
--- a/libgda/sql-parser/gen_def.c
+++ b/libgda/sql-parser/gen_def.c
@@ -53,7 +53,7 @@ typedef enum {
static void parse_contents (FILE *stream, SourceType type);
static HashEntry *find_entry_for_token (char *token);
int
-main (int argc,char** argv)
+main ()
{
int i;
FILE *fd_imposed;
diff --git a/libgda/sql-parser/lemon.c b/libgda/sql-parser/lemon.c
index 96e4efc4b..a81f1d87a 100644
--- a/libgda/sql-parser/lemon.c
+++ b/libgda/sql-parser/lemon.c
@@ -1057,7 +1057,7 @@ void FindActions(struct lemon *lemp)
static int resolve_conflict(
struct action *apx,
struct action *apy,
- struct symbol *errsym /* The error symbol (if defined. NULL otherwise) */
+ G_GNUC_UNUSED struct symbol *errsym /* The error symbol (if defined. NULL otherwise) */
){
struct symbol *spx, *spy;
int errcnt = 0;
@@ -1397,7 +1397,7 @@ int disable_header = 0;
int disable_c = 0;
/* The main program. Parse the command line and do it... */
-int main(int argc, char **argv)
+int main(G_GNUC_UNUSED int argc, char **argv)
{
static int version = 0;
static int rpflag = 0;
diff --git a/libgda/test-cnc-exec.c b/libgda/test-cnc-exec.c
index dc6bec446..e3eb605c7 100644
--- a/libgda/test-cnc-exec.c
+++ b/libgda/test-cnc-exec.c
@@ -25,7 +25,7 @@ static guint test1 (void);
static guint test2 (void);
-int main(int argc, const char *argv[])
+int main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED const char *argv[])
{
gda_init ();
guint nfailed = 0;
diff --git a/libgda/test-cnc-meta.c b/libgda/test-cnc-meta.c
index 35ce80fbf..6623fe71c 100644
--- a/libgda/test-cnc-meta.c
+++ b/libgda/test-cnc-meta.c
@@ -23,7 +23,7 @@
static guint test1 (void);
-int main(int argc, const char *argv[])
+int main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED const char *argv[])
{
gda_init ();
guint nfailed = 0;
diff --git a/libgda/test-cnc-open.c b/libgda/test-cnc-open.c
index 2d9fa78c0..63257c167 100644
--- a/libgda/test-cnc-open.c
+++ b/libgda/test-cnc-open.c
@@ -29,7 +29,7 @@ static guint test3 (void);
static guint test4 (void);
static guint test5 (void);
-int main(int argc, const char *argv[])
+int main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED const char *argv[])
{
gda_init ();
guint nfailed = 0;
@@ -310,7 +310,7 @@ test4 (void)
}
static void
-t5_status_changed_cb (GdaConnection *cnc, GdaConnectionStatus status, guint *nsignals)
+t5_status_changed_cb (G_GNUC_UNUSED GdaConnection *cnc, GdaConnectionStatus status, guint *nsignals)
{
gchar *status_str[] = {
"CLOSED",
diff --git a/libgda/thread-wrapper/background.c b/libgda/thread-wrapper/background.c
index 359cfd124..3e10b92c0 100644
--- a/libgda/thread-wrapper/background.c
+++ b/libgda/thread-wrapper/background.c
@@ -168,7 +168,7 @@ compute_wait_delay (void)
* MAIN part of the "background" thread
*/
static gpointer
-background_main (gpointer data)
+background_main (G_GNUC_UNUSED gpointer data)
{
GTimer *timer;
guint elapsed_ms = 0;
@@ -502,7 +502,7 @@ bg_update_stats (BackgroundStats type)
}
#else
void
-bg_update_stats (BackgroundStats type)
+bg_update_stats (G_GNUC_UNUSED BackgroundStats type)
{
}
#endif
diff --git a/libgda/thread-wrapper/gda-connect.c b/libgda/thread-wrapper/gda-connect.c
index e44484fa4..f0ae22525 100644
--- a/libgda/thread-wrapper/gda-connect.c
+++ b/libgda/thread-wrapper/gda-connect.c
@@ -122,7 +122,7 @@ sig_closure_marshal (GClosure *closure,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
- gpointer marshal_data)
+ G_GNUC_UNUSED gpointer marshal_data)
{
SigClosure *sig_closure;
sig_closure = (SigClosure *) closure;
@@ -268,7 +268,7 @@ gda_signal_connect (gpointer instance,
const gchar *detailed_signal,
GCallback c_handler,
gpointer data,
- GClosureNotify destroy_data,
+ G_GNUC_UNUSED GClosureNotify destroy_data,
GConnectFlags connect_flags,
GMainContext *context)
{
diff --git a/libgda/thread-wrapper/gda-worker.c b/libgda/thread-wrapper/gda-worker.c
index 9477106b5..5e193683c 100644
--- a/libgda/thread-wrapper/gda-worker.c
+++ b/libgda/thread-wrapper/gda-worker.c
@@ -458,7 +458,7 @@ gda_worker_unref (GdaWorker *worker)
static guint
_gda_worker_submit_job_with_its (GdaWorker *worker, ITSignaler *reply_its, GdaWorkerFunc func,
gpointer data, GDestroyNotify data_destroy_func,
- GDestroyNotify result_destroy_func, GError **error)
+ GDestroyNotify result_destroy_func, G_GNUC_UNUSED GError **error)
{
guint jid = 0;
WorkerJob *job;
diff --git a/libgda/thread-wrapper/itsignaler.c b/libgda/thread-wrapper/itsignaler.c
index 2f364d0f6..e21e9cb2a 100644
--- a/libgda/thread-wrapper/itsignaler.c
+++ b/libgda/thread-wrapper/itsignaler.c
@@ -798,7 +798,9 @@ GSourceFuncs funcs = {
its_source_prepare,
its_source_check,
its_source_dispatch,
- its_source_finalize
+ its_source_finalize,
+ NULL,
+ NULL
};
/**
@@ -845,7 +847,7 @@ itsignaler_create_source (ITSignaler *its)
}
static gboolean
-its_source_prepare (GSource *source, gint *timeout_)
+its_source_prepare (G_GNUC_UNUSED GSource *source, gint *timeout_)
{
*timeout_ = -1;
return FALSE;
@@ -937,7 +939,7 @@ itsignaler_add (ITSignaler *its, GMainContext *context, ITSignalerFunc func, gpo
* Returns: %TRUE if the source has been removed
*/
gboolean
-itsignaler_remove (ITSignaler *its, GMainContext *context, guint id)
+itsignaler_remove (G_GNUC_UNUSED ITSignaler *its, GMainContext *context, guint id)
{
GSource *source;
source = g_main_context_find_source_by_id (context, id);
diff --git a/libgda/thread-wrapper/test-blocking-itsignaler.c
b/libgda/thread-wrapper/test-blocking-itsignaler.c
index b103d4755..156386dff 100644
--- a/libgda/thread-wrapper/test-blocking-itsignaler.c
+++ b/libgda/thread-wrapper/test-blocking-itsignaler.c
@@ -32,7 +32,7 @@ typedef struct {
static gpointer thread1_start (ITSignaler *its);
int
-main (int argc, char** argv)
+main ()
{
g_print ("Test started\n");
diff --git a/libgda/thread-wrapper/test-itsignaler.c b/libgda/thread-wrapper/test-itsignaler.c
index e3f4c44be..ae195621d 100644
--- a/libgda/thread-wrapper/test-itsignaler.c
+++ b/libgda/thread-wrapper/test-itsignaler.c
@@ -33,7 +33,7 @@ int test3 (void);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gint nfailed = 0;
diff --git a/libgda/thread-wrapper/test-raw-itsignaler.c b/libgda/thread-wrapper/test-raw-itsignaler.c
index 00882c4c5..b7bca993f 100644
--- a/libgda/thread-wrapper/test-raw-itsignaler.c
+++ b/libgda/thread-wrapper/test-raw-itsignaler.c
@@ -47,7 +47,7 @@ typedef struct {
static gpointer thread1_start (ITSignaler *its);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
g_print ("Test started\n");
diff --git a/libgda/thread-wrapper/test-worker.c b/libgda/thread-wrapper/test-worker.c
index 4d7657a18..7605fb6b0 100644
--- a/libgda/thread-wrapper/test-worker.c
+++ b/libgda/thread-wrapper/test-worker.c
@@ -36,7 +36,7 @@ int test13 (void);
int
-main (int argc, char** argv)
+main ()
{
gint nfailed = 0;
@@ -86,7 +86,7 @@ data3_free (Data3 *data)
}
static gpointer
-test3_worker_func (Data3 *data, GError **error)
+test3_worker_func (Data3 *data, G_GNUC_UNUSED GError **error)
{
gint *retval;
g_print ("%s() called from thread %p\n", __FUNCTION__, g_thread_self());
@@ -153,7 +153,7 @@ test3 (void)
* Test 4: cancellation tests
*/
static gpointer
-test4_worker_func (gpointer data, GError **error)
+test4_worker_func (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
/* just spend some idle time */
g_print ("%s() called from thread %p\n", __FUNCTION__, g_thread_self());
@@ -234,7 +234,7 @@ test4 (void)
* Test 5: with main loop
*/
static gpointer
-test5_worker_func (gpointer data, GError **error)
+test5_worker_func (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
/* just spend some idle time */
g_print ("%s() called from thread %p\n", __FUNCTION__, g_thread_self());
@@ -260,7 +260,7 @@ test5_idle_push_jobs (GdaWorker *worker)
}
static void
-test5_worker_callback (GdaWorker *worker, guint job_id, gpointer result_data, GError *error, GMainLoop *loop)
+test5_worker_callback (G_GNUC_UNUSED GdaWorker *worker, guint job_id, G_GNUC_UNUSED gpointer result_data,
G_GNUC_UNUSED GError *error, GMainLoop *loop)
{
static guint i = 0;
i++;
@@ -305,7 +305,7 @@ test5 (void)
* - job finishes before timer
*/
static gpointer
-test6_worker_func (gint *timeout_ms, GError **error)
+test6_worker_func (gint *timeout_ms, G_GNUC_UNUSED GError **error)
{
if (*timeout_ms > 0)
g_usleep ((gulong) *timeout_ms * 1000);
@@ -452,14 +452,14 @@ test7 (void)
* Test 8: submit a job from within the worker thread
*/
static gpointer
-test8_sub_func (gpointer unused_data, GError **error)
+test8_sub_func (G_GNUC_UNUSED gpointer unused_data, G_GNUC_UNUSED GError **error)
{
g_print ("%s() called in thread %p\n", __FUNCTION__, g_thread_self());
return "test8_sub_func";
}
static gpointer
-test8_func (GdaWorker *worker, GError **error)
+test8_func (GdaWorker *worker, G_GNUC_UNUSED GError **error)
{
guint jid;
jid = gda_worker_submit_job (worker, NULL, (GdaWorkerFunc) test8_sub_func, NULL, NULL, NULL, error);
@@ -541,7 +541,7 @@ typedef struct {
} Test9Data;
static void
-test9data_free (Test9Data *data)
+test9data_free (G_GNUC_UNUSED Test9Data *data)
{
/* should not be called by GdaWorker, instead it is freed manually using g_free() */
g_assert_not_reached ();
@@ -549,7 +549,7 @@ test9data_free (Test9Data *data)
/* function run by the worker thread */
static gpointer
-test9_job_func (Test9Data *data, GError **error)
+test9_job_func (Test9Data *data, G_GNUC_UNUSED GError **error)
{
g_print ("job_func (thread => %p, data => %p)\n", g_thread_self(), data);
data->out = data->in;
@@ -558,7 +558,7 @@ test9_job_func (Test9Data *data, GError **error)
/* function called back in the context which submitted the jobs */
static void
-test9_worker_cb (GdaWorker *worker, guint job_id, Test9Data *data, GError *error, GThread *thread)
+test9_worker_cb (G_GNUC_UNUSED GdaWorker *worker, G_GNUC_UNUSED guint job_id, Test9Data *data, G_GNUC_UNUSED
GError *error, GThread *thread)
{
g_print ("%s (thread => %p, result_data => %p)\n", __FUNCTION__, g_thread_self(), data);
@@ -660,7 +660,7 @@ test9 (void)
* Test 10: test gda_worker_wait_job()
*/
static gpointer
-test10_func_slow (gpointer data, GError **error)
+test10_func_slow (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
g_print ("In %s()...\n", __FUNCTION__);
g_usleep (500000); /* wait half a second */
@@ -669,7 +669,7 @@ test10_func_slow (gpointer data, GError **error)
}
static gpointer
-test10_func_fast (gpointer data, GError **error)
+test10_func_fast (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
g_print ("Passed through %s()...\n", __FUNCTION__);
return (gpointer) 0x02;
@@ -711,7 +711,7 @@ test10 (void)
* Test 11: test gda_worker_do_job(), no timeout
*/
static gpointer
-test11_func (gpointer data, GError **error)
+test11_func (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
g_print ("In %s()...\n", __FUNCTION__);
g_usleep (500000); /* wait half a second */
@@ -720,7 +720,7 @@ test11_func (gpointer data, GError **error)
}
static gpointer
-test11_func_e (gpointer data, GError **error)
+test11_func_e (G_GNUC_UNUSED gpointer data, GError **error)
{
g_print ("In %s()...\n", __FUNCTION__);
g_usleep (500000); /* wait half a second */
@@ -777,7 +777,7 @@ test11 (void)
* Test 12: gda_worker_do_job() for quick jobs
*/
static gpointer
-test12_func (gpointer data, GError **error)
+test12_func (G_GNUC_UNUSED gpointer data, G_GNUC_UNUSED GError **error)
{
/* make it as quick as possible */
return (gpointer) 0x02;
@@ -816,7 +816,7 @@ test12 (void)
* Test 13: gda_worker_do_job() for several jobs
*/
static gpointer
-test13_func (gpointer data, GError **error)
+test13_func (gpointer data, G_GNUC_UNUSED GError **error)
{
g_print ("%s (%s) in thread %p\n", __FUNCTION__, (gchar *) data, g_thread_self ());
static guint i = 1;
diff --git a/meson.build b/meson.build
index ca70e6b29..5a1bfcd7f 100644
--- a/meson.build
+++ b/meson.build
@@ -44,8 +44,8 @@ girscanner = find_program('g-ir-scanner', required:false)
valadoc = find_program('valadoc', required: false)
-inc_rooth = include_directories ('.')
-inc_rooth_dep = declare_dependency (include_directories : inc_rooth)
+libgda_inc_rooth = include_directories ('.')
+inc_rooth_dep = declare_dependency (include_directories : libgda_inc_rooth)
req_ver_glib = '>= 2.38.0'
glib_dep = dependency('glib-2.0', version : req_ver_glib)
@@ -202,6 +202,9 @@ endif
configh = configure_file(output : 'config.h',
configuration : confh)
+general_cargs = [
+ '-DLIBGDA_ABI_NAME='+project_api_name
+ ]
c_args = ['-Wall',
'-Wextra',
'-Wformat-security',
@@ -210,8 +213,10 @@ c_args = ['-Wall',
'-Wno-unused-parameter',
'-Wno-pointer-sign',
'-Wno-missing-field-initializers',
- '-DGSEAL_ENABLE',
- '-DLIBGDA_ABI_NAME='+project_api_name]
+ '-DGSEAL_ENABLE'
+ ]
+
+c_args += general_cargs
glade_catalog = ''
glade_pixmap = ''
diff --git a/providers/oracle/gen_def.c b/providers/oracle/gen_def.c
index 9e780a252..418d81efa 100644
--- a/providers/oracle/gen_def.c
+++ b/providers/oracle/gen_def.c
@@ -49,7 +49,7 @@ typedef enum {
static void parse_contents (FILE *stream, SourceType type);
static HashEntry *find_entry_for_token (char *token);
int
-main (int argc,char** argv)
+main ()
{
int i;
FILE *fd_imposed;
diff --git a/providers/reuseable/mysql/gen_def.c b/providers/reuseable/mysql/gen_def.c
index 7e17a98ae..630155dfd 100644
--- a/providers/reuseable/mysql/gen_def.c
+++ b/providers/reuseable/mysql/gen_def.c
@@ -49,7 +49,7 @@ typedef enum {
static void parse_contents (FILE *stream, SourceType type);
static HashEntry *find_entry_for_token (char *token);
int
-main (int argc,char** argv)
+main ()
{
int i;
FILE *fd_imposed;
diff --git a/providers/reuseable/postgres/gen_def.c b/providers/reuseable/postgres/gen_def.c
index 25e7c6319..946e38d30 100644
--- a/providers/reuseable/postgres/gen_def.c
+++ b/providers/reuseable/postgres/gen_def.c
@@ -49,7 +49,7 @@ typedef enum {
static void parse_contents (FILE *stream, SourceType type);
static HashEntry *find_entry_for_token (char *token);
int
-main (int argc,char** argv)
+main ()
{
int i;
FILE *fd_imposed;
diff --git a/providers/skel-implementation/capi/gen_def.c b/providers/skel-implementation/capi/gen_def.c
index 9859f1635..c34ecc47e 100644
--- a/providers/skel-implementation/capi/gen_def.c
+++ b/providers/skel-implementation/capi/gen_def.c
@@ -55,7 +55,7 @@ typedef enum {
static void parse_contents (FILE *stream, SourceType type);
static HashEntry *find_entry_for_token (char *token);
int
-main (int argc,char** argv)
+main ()
{
int i;
FILE *fd_imposed;
diff --git a/tests/data-model-errors.c b/tests/data-model-errors.c
index 89bcff1c7..94237a41a 100644
--- a/tests/data-model-errors.c
+++ b/tests/data-model-errors.c
@@ -231,7 +231,7 @@ gda_data_model_errors_get_n_rows (GdaDataModel *model)
}
static gint
-gda_data_model_errors_get_n_columns (GdaDataModel *model)
+gda_data_model_errors_get_n_columns (G_GNUC_UNUSED GdaDataModel *model)
{
return NCOLS;
}
@@ -248,7 +248,7 @@ gda_data_model_errors_describe_column (GdaDataModel *model, gint col)
}
static GdaDataModelAccessFlags
-gda_data_model_errors_get_access_flags (GdaDataModel *model)
+gda_data_model_errors_get_access_flags (G_GNUC_UNUSED GdaDataModel *model)
{
GdaDataModelAccessFlags flags;
@@ -312,7 +312,7 @@ gda_data_model_errors_get_value_at (GdaDataModel *model, gint col, gint row, GEr
}
static GdaValueAttribute
-gda_data_model_errors_get_attributes_at (GdaDataModel *model, gint col, G_GNUC_UNUSED gint row)
+gda_data_model_errors_get_attributes_at (G_GNUC_UNUSED GdaDataModel *model, gint col, G_GNUC_UNUSED gint row)
{
GdaValueAttribute flags = 0;
if ((col < 0) || (col > NCOLS)) {
@@ -365,7 +365,7 @@ gda_data_model_errors_set_value_at (GdaDataModel *model, gint col, gint row, con
static gint
-gda_data_model_errors_append_values (GdaDataModel *model, G_GNUC_UNUSED const GList *values, GError **error)
+gda_data_model_errors_append_values (G_GNUC_UNUSED GdaDataModel *model, G_GNUC_UNUSED const GList *values,
GError **error)
{
TO_IMPLEMENT;
g_set_error (error, GDA_DATA_MODEL_ERROR, GDA_DATA_MODEL_FEATURE_NON_SUPPORTED_ERROR,
diff --git a/tests/data-models/check_data_proxy.c b/tests/data-models/check_data_proxy.c
index 88698b4ad..3d49a4a77 100644
--- a/tests/data-models/check_data_proxy.c
+++ b/tests/data-models/check_data_proxy.c
@@ -72,7 +72,7 @@ static void free_values_list (GList *list);
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
@@ -191,7 +191,7 @@ main (int argc, char **argv)
}
static GError *
-validate_row_changes (GdaDataProxy *proxy, gint row, gint proxied_row, gchar *token)
+validate_row_changes (GdaDataProxy *proxy, gint row, G_GNUC_UNUSED gint proxied_row, G_GNUC_UNUSED gchar
*token)
{
const GValue *cvalue;
/* refuse if population < 100 */
@@ -1442,7 +1442,7 @@ wait_for_signals (void)
}
static void
-proxy_reset_cb (GdaDataModel *model, gchar *detail)
+proxy_reset_cb (G_GNUC_UNUSED GdaDataModel *model, G_GNUC_UNUSED gchar *detail)
{
#ifdef CHECK_EXTRA_INFO
g_print ("RESET\n");
@@ -1450,7 +1450,7 @@ proxy_reset_cb (GdaDataModel *model, gchar *detail)
}
static void
-proxy_row_cb (GdaDataModel *model, gint row, gchar *detail)
+proxy_row_cb (G_GNUC_UNUSED GdaDataModel *model, gint row, gchar *detail)
{
gchar *str;
diff --git a/tests/data-models/check_data_select_iter.c b/tests/data-models/check_data_select_iter.c
index c8e1983ce..df60f02d3 100644
--- a/tests/data-models/check_data_select_iter.c
+++ b/tests/data-models/check_data_select_iter.c
@@ -53,7 +53,7 @@ main (gint argc,
}
void
-init_data (CheckIter *data, gconstpointer user_data) {
+init_data (CheckIter *data, G_GNUC_UNUSED gconstpointer user_data) {
GString *strc, *cstr;
GdaConnection *cnn;
GdaDataModel *model;
@@ -125,13 +125,13 @@ init_data (CheckIter *data, gconstpointer user_data) {
void
-finish_data (CheckIter *data, gconstpointer user_data) {
+finish_data (CheckIter *data, G_GNUC_UNUSED gconstpointer user_data) {
g_object_unref (data->model);
g_object_unref (data->cnn);
}
-void test_move_to (CheckIter *data, gconstpointer user_data) {
+void test_move_to (CheckIter *data, G_GNUC_UNUSED gconstpointer user_data) {
GdaDataModel *model = data->model;
GdaDataModelIter *iter;
const GValue *value;
diff --git a/tests/data-models/check_empty_rs.c b/tests/data-models/check_empty_rs.c
index 60c94ee3a..87b37238d 100644
--- a/tests/data-models/check_empty_rs.c
+++ b/tests/data-models/check_empty_rs.c
@@ -38,7 +38,7 @@ ATestData tests [] = {
};
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
GError *error = NULL;
gint i, nfailed;
diff --git a/tests/data-models/check_model_errors.c b/tests/data-models/check_model_errors.c
index e8cb0648c..cb49ea4b7 100644
--- a/tests/data-models/check_model_errors.c
+++ b/tests/data-models/check_model_errors.c
@@ -46,7 +46,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
guint i, ntests = 0, number_failed = 0;
@@ -168,7 +168,7 @@ check_iter_contents (GdaDataModel *model, GdaDataModelIter *iter)
* Returns the number of failures
*/
static gint
-test1 (GdaConnection *cnc)
+test1 (G_GNUC_UNUSED GdaConnection *cnc)
{
GdaDataModel *model;
gint nfailed = 0;
@@ -315,7 +315,7 @@ compare_data_models (GdaDataModel *model1, GdaDataModel *model2, GError **error)
* Returns the number of failures
*/
static gint
-test2 (GdaConnection *cnc)
+test2 (G_GNUC_UNUSED GdaConnection *cnc)
{
GdaDataModel *model = NULL;
gint nfailed = 0;
diff --git a/tests/data-models/check_pivot.c b/tests/data-models/check_pivot.c
index a89663048..e57f2e542 100644
--- a/tests/data-models/check_pivot.c
+++ b/tests/data-models/check_pivot.c
@@ -31,7 +31,7 @@ static gint test_column_formats (GdaDataPivot *pivot);
static gint test_on_data (GdaConnection *cnc);
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
GdaDataModel *source;
diff --git a/tests/data-models/check_pmodel.c b/tests/data-models/check_pmodel.c
index dae2e7263..ee47c8424 100644
--- a/tests/data-models/check_pmodel.c
+++ b/tests/data-models/check_pmodel.c
@@ -103,7 +103,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
guint i, ntests = 0, number_failed = 0;
GdaConnection *cnc;
@@ -1254,7 +1254,7 @@ test11 (GdaConnection *cnc)
return nfailed;
}
-void iter_row_changed (GdaDataModelIter *iter, gint row) {
+void iter_row_changed (G_GNUC_UNUSED GdaDataModelIter *iter, gint row) {
g_print ("Iter row-changed signal emitted for row: %d\n", row);
}
/*
diff --git a/tests/data-models/check_vcnc.c b/tests/data-models/check_vcnc.c
index e5c7564fa..6efd8fa89 100644
--- a/tests/data-models/check_vcnc.c
+++ b/tests/data-models/check_vcnc.c
@@ -56,7 +56,7 @@ static gboolean check_date (GdaConnection *virtual, GError **error);
static gboolean test1 (Data *data);
int
-main (int argc, char *argv[])
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char *argv[])
{
GMainLoop *loop;
gda_init ();
@@ -436,7 +436,7 @@ load_from_file (const gchar *filename)
}
static void
-move_iter_forward (GdaDataModelIter *iter, const gchar *iter_name, gint nb, GdaDataModel *ref, gint
start_row)
+move_iter_forward (GdaDataModelIter *iter, G_GNUC_UNUSED const gchar *iter_name, gint nb, GdaDataModel *ref,
gint start_row)
{
gint i;
for (i = 0; i < nb; i++) {
diff --git a/tests/data-models/check_virtual.c b/tests/data-models/check_virtual.c
index d5b6f818e..817763352 100644
--- a/tests/data-models/check_virtual.c
+++ b/tests/data-models/check_virtual.c
@@ -28,7 +28,7 @@ static gboolean test1 (void);
static gboolean test2 (void);
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
gint nfailed = 0;
gda_init ();
diff --git a/tests/db/check-db-base.c b/tests/db/check-db-base.c
index 9dbe6a9eb..38315c57c 100644
--- a/tests/db/check-db-base.c
+++ b/tests/db/check-db-base.c
@@ -32,7 +32,7 @@ typedef struct {
static void
test_db_base_start (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
self->obj = gda_db_base_new();
@@ -40,7 +40,7 @@ test_db_base_start (BaseFixture *self,
static void
test_db_base_finish (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
if (self->obj)
g_object_unref (self->obj);
@@ -48,7 +48,7 @@ test_db_base_finish (BaseFixture *self,
static void
test_db_base_run1 (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *catalog = "First";
const gchar *schema = "Second";
@@ -75,7 +75,7 @@ test_db_base_run1 (BaseFixture *self,
static void
test_db_base_run2 (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *catalog = "First";
const gchar *schema = "Second";
@@ -106,7 +106,7 @@ test_db_base_run2 (BaseFixture *self,
static void
test_db_base_run3 (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *schema = "Second";
const gchar *name = "Third";
@@ -131,7 +131,7 @@ test_db_base_run3 (BaseFixture *self,
static void
test_db_base_run4 (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *name = "Third";
@@ -156,7 +156,7 @@ test_db_base_run4 (BaseFixture *self,
static void
test_db_base_run5 (BaseFixture *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *catalog = "First";
const gchar *name = "Third";
diff --git a/tests/db/check-db-catalog-postgresql.c b/tests/db/check-db-catalog-postgresql.c
index dc0d5d63f..6d81bb818 100644
--- a/tests/db/check-db-catalog-postgresql.c
+++ b/tests/db/check-db-catalog-postgresql.c
@@ -240,7 +240,7 @@ static void create_countries_table (CheckDbObject *self) {
static void
test_db_catalog_start (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_init();
self->catalog = NULL;
@@ -307,7 +307,7 @@ test_db_catalog_start (CheckDbObject *self,
static void
test_db_catalog_finish (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
if (self->cnc != NULL) {
gda_connection_close(self->cnc,NULL);
@@ -319,7 +319,7 @@ test_db_catalog_finish (CheckDbObject *self,
static void
test_tables (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
if (!self->cont) {
g_message ("Test skiped");
diff --git a/tests/db/check-db-catalog.c b/tests/db/check-db-catalog.c
index 0160fcbe3..ce3bdc394 100644
--- a/tests/db/check-db-catalog.c
+++ b/tests/db/check-db-catalog.c
@@ -58,7 +58,7 @@ typedef struct {
static void
test_db_catalog_start (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_init();
self->xmlfile = NULL;
@@ -99,7 +99,7 @@ test_db_catalog_start (CheckDbObject *self,
static void
test_db_catalog_start_db (DbCatalogCnc *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_init();
@@ -166,7 +166,7 @@ test_db_catalog_start_db (DbCatalogCnc *self,
static void
test_db_catalog_finish (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_connection_close(self->cnc,NULL);
g_free (self->xmlfile);
@@ -177,7 +177,7 @@ test_db_catalog_finish (CheckDbObject *self,
static void
test_db_catalog_finish_db (DbCatalogCnc *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_connection_close(self->cnc,NULL);
g_object_unref (self->cnc);
@@ -191,7 +191,7 @@ test_db_catalog_finish_db (DbCatalogCnc *self,
static void
test_db_catalog_parse_xml_path (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = gda_db_catalog_parse_file_from_path(self->catalog,
self->xmlfile,
@@ -202,7 +202,7 @@ test_db_catalog_parse_xml_path (CheckDbObject *self,
static void
test_db_catalog_parse_xml_file (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = gda_db_catalog_parse_file (self->catalog,self->file,NULL);
g_assert_true (res);
@@ -210,7 +210,7 @@ test_db_catalog_parse_xml_file (CheckDbObject *self,
static void
test_db_catalog_validate_xml (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = gda_db_catalog_validate_file_from_path (self->xmlfile,NULL);
g_assert_true (res);
@@ -218,7 +218,7 @@ test_db_catalog_validate_xml (CheckDbObject *self,
static void
test_db_catalog_create_db (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = gda_db_catalog_parse_file_from_path(self->catalog,
self->xmlfile,
@@ -244,7 +244,7 @@ test_db_catalog_create_db (CheckDbObject *self,
static void
test_db_catalog_parse_cnc (DbCatalogCnc *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean open_res;
const gchar* dntypes = "dntypes";
diff --git a/tests/db/check-db-column.c b/tests/db/check-db-column.c
index 23226a4a1..e4a37c13c 100644
--- a/tests/db/check-db-column.c
+++ b/tests/db/check-db-column.c
@@ -39,7 +39,7 @@ typedef struct {
static void
test_db_column_check_name (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *cname = gda_db_column_get_name (self->column);
g_assert_cmpstr (cname, ==,"column_name");
@@ -55,7 +55,7 @@ test_db_column_check_name (CheckDbObject *self,
static void
test_db_column_check_default (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *cname = gda_db_column_get_default (self->column);
g_assert_cmpstr (cname, ==,"12.34");
@@ -71,7 +71,7 @@ test_db_column_check_default (CheckDbObject *self,
static void
test_db_column_check_check (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *cname = gda_db_column_get_check (self->column);
g_assert_cmpstr (cname, ==,"compound_id > 0");
@@ -88,7 +88,7 @@ test_db_column_check_check (CheckDbObject *self,
static void
test_db_column_check_type (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *ctype = gda_db_column_get_ctype (self->column);
g_assert_cmpstr (ctype, ==,"string");
@@ -107,7 +107,7 @@ test_db_column_check_type (CheckDbObject *self,
static void
test_db_column_check_unique (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = FALSE;
res = gda_db_column_get_unique (self->column);
@@ -124,7 +124,7 @@ test_db_column_check_unique (CheckDbObject *self,
static void
test_db_column_check_pkey (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = FALSE;
res = gda_db_column_get_pkey (self->column);
@@ -141,7 +141,7 @@ test_db_column_check_pkey (CheckDbObject *self,
static void
test_db_column_check_nnul (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = TRUE;
@@ -159,7 +159,7 @@ test_db_column_check_nnul (CheckDbObject *self,
static void
test_db_column_check_autoinc (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean res = TRUE;
@@ -178,7 +178,7 @@ test_db_column_check_autoinc (CheckDbObject *self,
static void
test_db_column_check_comment (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar* comstr = gda_db_column_get_comment (self->column);
@@ -195,7 +195,7 @@ test_db_column_check_comment (CheckDbObject *self,
static void
test_db_column_check_size (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
guint size = gda_db_column_get_size (self->column);
@@ -212,7 +212,7 @@ test_db_column_check_size (CheckDbObject *self,
static void
test_db_column_startup (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
self->doc = NULL;
self->xmlfile = NULL;
@@ -247,7 +247,7 @@ test_db_column_startup (CheckDbObject *self,
static void
test_db_column_cleanup (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
g_free (self->xmlfile);
g_object_unref (self->column);
diff --git a/tests/db/check-db-db-create.c b/tests/db/check-db-db-create.c
index 52d0e024b..ab2557031 100644
--- a/tests/db/check-db-db-create.c
+++ b/tests/db/check-db-db-create.c
@@ -39,7 +39,7 @@ typedef struct {
static void
test_db_db_create_start(CheckCreatedb *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gda_init ();
self->catalog = NULL;
@@ -107,7 +107,7 @@ test_db_db_create_start(CheckCreatedb *self,
static void
test_db_db_create_finish (CheckCreatedb *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
/* Dropping all tables */
GdaServerOperation *op = gda_connection_create_operation (self->cnc,
@@ -137,7 +137,7 @@ test_db_db_create_finish (CheckCreatedb *self,
static void
test_db_db_create_test1 (CheckCreatedb *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
GValue *value_name = gda_value_new (G_TYPE_STRING);
diff --git a/tests/db/check-db-fkey.c b/tests/db/check-db-fkey.c
index 42945e71b..6b097a532 100644
--- a/tests/db/check-db-fkey.c
+++ b/tests/db/check-db-fkey.c
@@ -45,7 +45,7 @@ typedef struct {
static void
test_db_fkey_run2 (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *reftable = NULL;
@@ -92,7 +92,7 @@ test_db_fkey_run1 (void)
static void
test_db_fkey_run3 (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
xmlNodePtr node = NULL;
xmlDocPtr doc = NULL;
@@ -118,7 +118,7 @@ test_db_fkey_run3 (CheckDbObject *self,
static void
test_db_fkey_start (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
self->doc = NULL;
self->xmlfile = NULL;
@@ -170,7 +170,7 @@ test_db_fkey_start (CheckDbObject *self,
static void
test_db_fkey_finish (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
g_free (self->xmlfile);
g_object_unref (self->fkey);
diff --git a/tests/db/check-db-view.c b/tests/db/check-db-view.c
index f39371ad4..943bd8114 100644
--- a/tests/db/check-db-view.c
+++ b/tests/db/check-db-view.c
@@ -43,7 +43,7 @@ typedef struct {
static void
test_db_view_name (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *name = NULL;
@@ -54,7 +54,7 @@ test_db_view_name (CheckDbObject *self,
static void
test_db_view_temp (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean istemp = FALSE;
@@ -65,7 +65,7 @@ test_db_view_temp (CheckDbObject *self,
static void
test_db_view_replace (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean replace = FALSE;
@@ -76,7 +76,7 @@ test_db_view_replace (CheckDbObject *self,
static void
test_db_view_ifnoexist (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
gboolean ifnoexist = FALSE;
@@ -87,7 +87,7 @@ test_db_view_ifnoexist (CheckDbObject *self,
static void
test_db_view_defstr (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
const gchar *defstr = NULL;
@@ -105,7 +105,7 @@ test_db_view_general (void)
static void
test_db_view_start (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
self->doc = NULL;
self->xmlfile = NULL;
@@ -147,7 +147,7 @@ test_db_view_start (CheckDbObject *self,
static void
test_db_view_finish (CheckDbObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
g_free (self->xmlfile);
g_object_unref (self->view);
diff --git a/tests/meson.build b/tests/meson.build
index 37f7bd8e2..2e4ca6375 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,10 +1,10 @@
test_cargs = [
'-include',
- meson.build_root() + '/config.h',
+ 'config.h',
'-DCHECK_FILES="'+meson.source_root()+'"',
'-DTOP_BUILD_DIR="'+meson.build_root()+'"'
]
-test_cargs += c_args
+test_cargs += general_cargs
test_headers = files([
'raw-ddl-creator.h'
diff --git a/tests/meta-store/check_meta_store_memory.c b/tests/meta-store/check_meta_store_memory.c
index 3925b6854..68ae0a1b0 100644
--- a/tests/meta-store/check_meta_store_memory.c
+++ b/tests/meta-store/check_meta_store_memory.c
@@ -21,7 +21,7 @@
#include "common.h"
int
-main (int argc, char ** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv)
{
GdaMetaStore *store;
diff --git a/tests/meta-store/check_meta_store_mysql.c b/tests/meta-store/check_meta_store_mysql.c
index 44eb8a54d..35eff8241 100644
--- a/tests/meta-store/check_meta_store_mysql.c
+++ b/tests/meta-store/check_meta_store_mysql.c
@@ -21,7 +21,7 @@
#include "common.h"
int
-main(int argc, char ** argv)
+main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv)
{
GdaMetaStore *store;
gchar *cnc_string;
diff --git a/tests/meta-store/check_meta_store_postgresql.c b/tests/meta-store/check_meta_store_postgresql.c
index 1e728daf4..dc9061a80 100644
--- a/tests/meta-store/check_meta_store_postgresql.c
+++ b/tests/meta-store/check_meta_store_postgresql.c
@@ -22,7 +22,7 @@
#include "common.h"
int
-main(int argc, char ** argv)
+main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv)
{
GdaConnection *cnc;
GdaMetaStore *store;
diff --git a/tests/meta-store/check_meta_store_sqlite.c b/tests/meta-store/check_meta_store_sqlite.c
index 837108908..92eddb9f9 100644
--- a/tests/meta-store/check_meta_store_sqlite.c
+++ b/tests/meta-store/check_meta_store_sqlite.c
@@ -23,7 +23,7 @@
#include "common.h"
int
-main(int argc, char ** argv)
+main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv)
{
GdaMetaStore *store;
GFile *pdir;
diff --git a/tests/meta-store/common.c b/tests/meta-store/common.c
index 516d6710d..0d0812f57 100644
--- a/tests/meta-store/common.c
+++ b/tests/meta-store/common.c
@@ -104,7 +104,7 @@ find_expected_change (const gchar *change_as_str)
}
static void
-meta_changed_cb (GdaMetaStore *store, GSList *changes, gpointer data)
+meta_changed_cb (G_GNUC_UNUSED GdaMetaStore *store, GSList *changes, G_GNUC_UNUSED gpointer data)
{
GSList *gl;
for (gl = changes; gl; gl = gl->next) {
@@ -131,7 +131,7 @@ meta_changed_cb (GdaMetaStore *store, GSList *changes, gpointer data)
}
static GError *
-suggest_update_cb (GdaMetaStore *store, GdaMetaContext *context, gpointer data)
+suggest_update_cb (G_GNUC_UNUSED GdaMetaStore *store, GdaMetaContext *context, G_GNUC_UNUSED gpointer data)
{
gint i;
g_print ("test: Update suggested for table %s:\n", context->table_name);
diff --git a/tests/multi-threading/check_cnc_lock.c b/tests/multi-threading/check_cnc_lock.c
index 86b70b7f7..adee979c7 100644
--- a/tests/multi-threading/check_cnc_lock.c
+++ b/tests/multi-threading/check_cnc_lock.c
@@ -39,7 +39,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gchar *fname;
GError *error = NULL;
@@ -98,7 +98,7 @@ typedef struct _ThData {
} ThData;
static gboolean
-test_multiple_threads (GThreadFunc func, GError **error)
+test_multiple_threads (GThreadFunc func, G_GNUC_UNUSED GError **error)
{
ThData data[NTHREADS];
gint i;
diff --git a/tests/multi-threading/check_parser.c b/tests/multi-threading/check_parser.c
index d2a224da7..ab864acf1 100644
--- a/tests/multi-threading/check_parser.c
+++ b/tests/multi-threading/check_parser.c
@@ -77,7 +77,7 @@ static gpointer start_thread (ThData *data);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
GdaSqlParser *parser;
@@ -165,7 +165,7 @@ main (int argc, char** argv)
}
static void
-set_mode_foreach (gpointer key, gpointer value, gpointer pmode)
+set_mode_foreach (G_GNUC_UNUSED gpointer key, gpointer value, gpointer pmode)
{
g_object_set (G_OBJECT (value), "mode", GPOINTER_TO_INT (pmode), NULL);
}
diff --git a/tests/parser/check_dml_comp.c b/tests/parser/check_dml_comp.c
index 0b9d16e72..f98516005 100644
--- a/tests/parser/check_dml_comp.c
+++ b/tests/parser/check_dml_comp.c
@@ -34,7 +34,7 @@ static gint do_test (const xmlChar *id, const xmlChar *sql,
const gchar *computed_type, const xmlChar *computed_exp, gboolean require_pk);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
xmlNodePtr root, node;
diff --git a/tests/parser/check_normalization.c b/tests/parser/check_normalization.c
index 9963f1a1e..eca7d2d44 100644
--- a/tests/parser/check_normalization.c
+++ b/tests/parser/check_normalization.c
@@ -33,7 +33,7 @@ GdaConnection *cnc;
static gint do_test (const xmlChar *id, const xmlChar *sql, const xmlChar *norm);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
xmlNodePtr root, node;
diff --git a/tests/parser/check_parser.c b/tests/parser/check_parser.c
index 926526780..4da1367da 100644
--- a/tests/parser/check_parser.c
+++ b/tests/parser/check_parser.c
@@ -33,7 +33,7 @@ static gint do_test (GdaSqlParser *parser, const xmlChar *id, const xmlChar *sql
const xmlChar *error_line, const xmlChar *error_col);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
xmlNodePtr root, node;
diff --git a/tests/parser/check_script.c b/tests/parser/check_script.c
index 335fb1ea2..802f098f4 100644
--- a/tests/parser/check_script.c
+++ b/tests/parser/check_script.c
@@ -33,7 +33,7 @@ static GdaSqlParser *create_parser_for_provider (const gchar *prov_name);
static gint do_test (GdaSqlParser *parser, const xmlChar *id, const xmlChar *file, xmlNodePtr test_node);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
xmlNodePtr root, node;
diff --git a/tests/parser/check_validation.c b/tests/parser/check_validation.c
index 605cb096f..3ca73036d 100644
--- a/tests/parser/check_validation.c
+++ b/tests/parser/check_validation.c
@@ -33,7 +33,7 @@ GdaConnection *cnc;
static gint do_test (const xmlChar *id, const xmlChar *sql, gboolean valid_expected);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
xmlDocPtr doc;
xmlNodePtr root, node;
diff --git a/tests/providers/check_mysql.c b/tests/providers/check_mysql.c
index 16a9f5ec4..a8462830e 100644
--- a/tests/providers/check_mysql.c
+++ b/tests/providers/check_mysql.c
@@ -26,7 +26,7 @@ extern GdaConnection *cnc;
extern gboolean params_provided;
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
gchar **env;
diff --git a/tests/providers/check_postgres.c b/tests/providers/check_postgres.c
index 069faa219..e666010d0 100644
--- a/tests/providers/check_postgres.c
+++ b/tests/providers/check_postgres.c
@@ -34,7 +34,7 @@ extern gboolean fork_tests;
//static int test_timestamp_change_format (void);
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
fork_tests = FALSE;
diff --git a/tests/providers/check_postgres_meta_partial-1.c b/tests/providers/check_postgres_meta_partial-1.c
index f3e7a08d9..0b65af80f 100644
--- a/tests/providers/check_postgres_meta_partial-1.c
+++ b/tests/providers/check_postgres_meta_partial-1.c
@@ -31,7 +31,7 @@ extern gboolean params_provided;
extern gboolean fork_tests;
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
fork_tests = FALSE;
diff --git a/tests/providers/check_postgres_meta_partial-2.c b/tests/providers/check_postgres_meta_partial-2.c
index 770899ef3..82b05fa00 100644
--- a/tests/providers/check_postgres_meta_partial-2.c
+++ b/tests/providers/check_postgres_meta_partial-2.c
@@ -31,7 +31,7 @@ extern gboolean params_provided;
extern gboolean fork_tests;
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
fork_tests = FALSE;
diff --git a/tests/providers/check_sqlcipher.c b/tests/providers/check_sqlcipher.c
index 98d1892b8..5b9c8d354 100644
--- a/tests/providers/check_sqlcipher.c
+++ b/tests/providers/check_sqlcipher.c
@@ -28,7 +28,7 @@ extern gboolean params_provided;
extern gboolean fork_tests;
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
fork_tests = FALSE;
diff --git a/tests/providers/check_sqlite.c b/tests/providers/check_sqlite.c
index 010f90ed4..7f1ba6906 100644
--- a/tests/providers/check_sqlite.c
+++ b/tests/providers/check_sqlite.c
@@ -27,7 +27,7 @@ extern gboolean params_provided;
extern gboolean fork_tests;
int
-main (int argc, char **argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
int number_failed = 0;
fork_tests = FALSE;
diff --git a/tests/providers/prov-test-common.c b/tests/providers/prov-test-common.c
index d3dee29c2..1273747fa 100644
--- a/tests/providers/prov-test-common.c
+++ b/tests/providers/prov-test-common.c
@@ -529,7 +529,7 @@ prov_test_common_check_meta_identifiers (gboolean case_sensitive, gboolean updat
GdaDataModel* data;
GValue *value, *value2;
const GValue *cvalue;
- GdaMetaContext mcontext = {"_tables", 1, NULL, NULL};
+ GdaMetaContext mcontext = {"_tables", 1, NULL, NULL, NULL};
GdaConnectionOptions options;
#ifdef CHECK_EXTRA_INFO
diff --git a/tests/providers/prov-test-util.c b/tests/providers/prov-test-util.c
index e0af1198a..0058b55ec 100644
--- a/tests/providers/prov-test-util.c
+++ b/tests/providers/prov-test-util.c
@@ -155,7 +155,7 @@ prov_test_check_types_schema (GdaConnection *cnc)
GdaDataModel *schema_m;
GError *error = NULL;
gchar *str;
- GdaMetaContext mcontext = {"_builtin_data_types", 0, NULL, NULL};
+ GdaMetaContext mcontext = {"_builtin_data_types", 0, NULL, NULL, NULL};
g_print ("updating [%s]\n", mcontext.table_name);
if (! gda_connection_update_meta_store (cnc, &mcontext, &error)) {
g_warning ("Can't update meta store: %s\n",
diff --git a/tests/test-bin-converter.c b/tests/test-bin-converter.c
index 088640baf..3aa04cacb 100644
--- a/tests/test-bin-converter.c
+++ b/tests/test-bin-converter.c
@@ -20,7 +20,7 @@
#include <libgda/libgda.h>
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gchar *file;
GdaBinary* bin;
diff --git a/tests/test-connection-string-split.c b/tests/test-connection-string-split.c
index f281280c2..5245c89d3 100644
--- a/tests/test-connection-string-split.c
+++ b/tests/test-connection-string-split.c
@@ -73,7 +73,7 @@ ATest the_tests[] = {
};
int
-main (int argc, char *argv[])
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char *argv[])
{
#if GLIB_CHECK_VERSION(2,36,0)
#else
diff --git a/tests/test-ddl-creator.c b/tests/test-ddl-creator.c
index a4ac6c1c2..a1f4af82a 100644
--- a/tests/test-ddl-creator.c
+++ b/tests/test-ddl-creator.c
@@ -21,7 +21,7 @@
#include "raw-ddl-creator.h"
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
RawDDLCreator *ddl;
GError *error = NULL;
diff --git a/tests/test-identifiers-quotes.c b/tests/test-identifiers-quotes.c
index 7adb587b6..2955b7367 100644
--- a/tests/test-identifiers-quotes.c
+++ b/tests/test-identifiers-quotes.c
@@ -156,7 +156,7 @@ check_result (ATest *test, const gchar *result, const gchar *expected, gboolean
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gda_init ();
guint i, nfailed = 0;
diff --git a/tests/test-input-parsers.c b/tests/test-input-parsers.c
index 1e64c7a7b..6ad4279d2 100644
--- a/tests/test-input-parsers.c
+++ b/tests/test-input-parsers.c
@@ -29,7 +29,7 @@ static gboolean test_time_handler (void);
static gboolean test_timestamp_handler (void);
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gint nfailed = 0;
diff --git a/tests/test-provider-meta.c b/tests/test-provider-meta.c
index 1c84fd74f..5fa1b8bac 100644
--- a/tests/test-provider-meta.c
+++ b/tests/test-provider-meta.c
@@ -30,8 +30,7 @@ typedef struct {
void test_iface (void);
gint
-main (gint argc,
- gchar *argv[])
+main (G_GNUC_UNUSED gint argc, G_GNUC_UNUSED gchar *argv[])
{
gchar *duri, *strc, *cstr, *db, *fpath;
const gchar *pdir;
diff --git a/tests/test-quark-list.c b/tests/test-quark-list.c
index 086ea8c73..4308ed90a 100644
--- a/tests/test-quark-list.c
+++ b/tests/test-quark-list.c
@@ -68,7 +68,7 @@ test_quark (GdaQuarkList *ql, guint *out_ntests)
}
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
GdaQuarkList *ql, *ql2;
guint nfailed = 0;
diff --git a/tests/test-server-operation.c b/tests/test-server-operation.c
index 81d57b722..d343007a2 100644
--- a/tests/test-server-operation.c
+++ b/tests/test-server-operation.c
@@ -31,7 +31,7 @@ typedef struct {
static void
test_server_operation_provider (CheckOPObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
GdaServerProvider *server = NULL;
GdaConnection *cnc = NULL;
@@ -47,7 +47,7 @@ test_server_operation_provider (CheckOPObject *self,
static void
test_server_operation_start (CheckOPObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
self->cnc = gda_connection_open_from_string ("SQLite", "DB_DIR=.;DB_NAME=op_test_db", NULL,
GDA_CONNECTION_OPTIONS_NONE, NULL);
@@ -65,7 +65,7 @@ test_server_operation_start (CheckOPObject *self,
static void
test_server_operation_finish (CheckOPObject *self,
- gconstpointer user_data)
+ G_GNUC_UNUSED gconstpointer user_data)
{
g_object_unref (self->op);
gda_connection_close (self->cnc,NULL);
diff --git a/tests/test-sql-builder.c b/tests/test-sql-builder.c
index 8397e1c9c..99a115619 100644
--- a/tests/test-sql-builder.c
+++ b/tests/test-sql-builder.c
@@ -63,7 +63,7 @@ ATest tests[] = {
};
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
gda_init ();
guint i, nfailed = 0;
diff --git a/tests/test-sql-identifier.c b/tests/test-sql-identifier.c
index a111b7f3e..c18699c97 100644
--- a/tests/test-sql-identifier.c
+++ b/tests/test-sql-identifier.c
@@ -77,7 +77,7 @@ identifier_needs_quotes (const gchar *str)
}
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
guint i, nfailed = 0;
for (i = 0; i < G_N_ELEMENTS (tests); i++) {
diff --git a/tests/test-sql-renderer.c b/tests/test-sql-renderer.c
index a0d4d981c..420aad042 100644
--- a/tests/test-sql-renderer.c
+++ b/tests/test-sql-renderer.c
@@ -252,7 +252,7 @@ do_a_test (GdaServerProvider *prov, GdaSqlParser *parser)
}
int
-main (int argc, char** argv)
+main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char** argv)
{
GdaDataModel *model;
guint i, nrows;
diff --git a/tests/value-holders/check_holder.c b/tests/value-holders/check_holder.c
index 67a0cbf76..de0c8819b 100644
--- a/tests/value-holders/check_holder.c
+++ b/tests/value-holders/check_holder.c
@@ -70,7 +70,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char** argv)
+main ()
{
#if GLIB_CHECK_VERSION(2,36,0)
#else
@@ -822,7 +822,7 @@ test9 (GError **error)
*/
static GError *
-t10_validate_change_cb (GdaHolder *h, const GValue *value, gchar *token)
+t10_validate_change_cb (G_GNUC_UNUSED GdaHolder *h, const GValue *value, gchar *token)
{
/* only accept GDA_VALUE_NULL or the "hi!" G_TYPE_STRING value */
g_assert (!strcmp (token, "AToken"));
diff --git a/tests/value-holders/check_set.c b/tests/value-holders/check_set.c
index 03d636f3f..7efb35f3c 100644
--- a/tests/value-holders/check_set.c
+++ b/tests/value-holders/check_set.c
@@ -56,7 +56,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char** argv)
+main ()
{
#if GLIB_CHECK_VERSION(2,36,0)
#else
@@ -181,7 +181,7 @@ test2 (GError **error)
* "validate-holder-change" signal
*/
static GError *
-t3_validate_holder_change (GdaSet *set, GdaHolder *h, const GValue *value, gchar *token)
+t3_validate_holder_change (G_GNUC_UNUSED GdaSet *set, GdaHolder *h, const GValue *value, gchar *token)
{
/* only accept GDA_VALUE_NULL or 444 value */
g_assert (!g_strcmp0 (token, "MyToken"));
@@ -471,7 +471,8 @@ emitted_signals_check_empty (gpointer obj, const gchar *signal_name, GError **er
}
static void
-set_3_cb (GObject *obj, GdaHolder *holder, const gchar *attr_name, const GValue *value, gchar *sig_name)
+set_3_cb (GObject *obj, GdaHolder *holder, G_GNUC_UNUSED const gchar *attr_name,
+ G_GNUC_UNUSED const GValue *value, gchar *sig_name)
{
EmittedSignal *es;
es = g_new0 (EmittedSignal, 1);
diff --git a/tests/value-holders/check_statement.c b/tests/value-holders/check_statement.c
index 76984226b..110160daa 100644
--- a/tests/value-holders/check_statement.c
+++ b/tests/value-holders/check_statement.c
@@ -38,7 +38,7 @@ TestFunc tests[] = {
};
int
-main (int argc, char** argv)
+main ()
{
#if GLIB_CHECK_VERSION(2,36,0)
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]