[libgda] Fix a compiler warning



commit af1474ae82f63892f6ba5ad7215bd7595889ea15
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Sep 23 10:45:44 2013 +0200

    Fix a compiler warning

 libgda/gda-server-provider.c |    4 ++--
 libgda/libcsv.c              |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgda/gda-server-provider.c b/libgda/gda-server-provider.c
index efd8702..c70a2d9 100644
--- a/libgda/gda-server-provider.c
+++ b/libgda/gda-server-provider.c
@@ -703,7 +703,7 @@ gda_server_provider_supports_feature (GdaServerProvider *provider, GdaConnection
 GdaDataHandler *
 gda_server_provider_get_data_handler_g_type (GdaServerProvider *provider, GdaConnection *cnc, GType for_type)
 {
-       GdaDataHandler *retval;
+       GdaDataHandler *retval = NULL;
        g_return_val_if_fail (GDA_IS_SERVER_PROVIDER (provider), NULL);
        g_return_val_if_fail (!cnc || GDA_IS_CONNECTION (cnc), NULL);
 
@@ -733,7 +733,7 @@ gda_server_provider_get_data_handler_g_type (GdaServerProvider *provider, GdaCon
 GdaDataHandler *
 gda_server_provider_get_data_handler_dbms (GdaServerProvider *provider, GdaConnection *cnc, const gchar 
*for_type)
 {
-       GdaDataHandler *retval;
+       GdaDataHandler *retval = NULL;
        g_return_val_if_fail (GDA_IS_SERVER_PROVIDER (provider), NULL);
        g_return_val_if_fail (for_type && *for_type, NULL);
        g_return_val_if_fail (!cnc || GDA_IS_CONNECTION (cnc), NULL);
diff --git a/libgda/libcsv.c b/libgda/libcsv.c
index 75f5061..0d3ab64 100644
--- a/libgda/libcsv.c
+++ b/libgda/libcsv.c
@@ -143,7 +143,7 @@ csv_fini(struct csv_parser *p, void (*cb1)(char *, size_t, void *), void (*cb2)(
 {
   /* Finalize parsing.  Needed, for example, when file does not end in a newline */
   int quoted = p->quoted;
-  int pstate = p->pstate;
+  int pstate = p->pstate; /* TODO: This is used by the macros, but the compiler thinks it is not used. */
   size_t spaces = p->spaces;
   size_t entry_pos = p->entry_pos;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]