[libgxps] path: avoid set but not used warnings



commit d1272be845d7b9739f7118675d792a66bf8b5504
Author: Ignacio Casal Quinteiro <ignacio casal nice-software com>
Date:   Thu Sep 8 14:35:32 2016 +0200

    path: avoid set but not used warnings
    
    These variables are only used in debug
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771057

 libgxps/gxps-path.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/libgxps/gxps-path.c b/libgxps/gxps-path.c
index e67ab39..ad1cfbb 100644
--- a/libgxps/gxps-path.c
+++ b/libgxps/gxps-path.c
@@ -480,7 +480,13 @@ gxps_path_parse (const gchar *data,
                         is_rel = TRUE;
                 case 'A':
                         while (token.type == PD_TOKEN_NUMBER) {
-                                gdouble xr, yr, rx, farc, fsweep, x, y;
+                                gdouble xr, yr, x, y;
+#ifdef GXPS_ENABLE_DEBUG
+                                /* TODO: for now these variables are only used
+                                 * in debug mode.
+                                 */
+                                gdouble rx, farc, fsweep;
+#endif
 
                                 if (!path_data_get_point (&token, &xr, &yr, error))
                                         return FALSE;
@@ -491,7 +497,9 @@ gxps_path_parse (const gchar *data,
                                         path_data_parse_error (&token, PD_TOKEN_NUMBER, error);
                                         return FALSE;
                                 }
+#ifdef GXPS_ENABLE_DEBUG
                                 rx = token.number;
+#endif
 
                                 if (!path_data_iter_next (&token, error))
                                         return FALSE;
@@ -499,7 +507,9 @@ gxps_path_parse (const gchar *data,
                                         path_data_parse_error (&token, PD_TOKEN_NUMBER, error);
                                         return FALSE;
                                 }
+#ifdef GXPS_ENABLE_DEBUG
                                 farc = token.number;
+#endif
 
                                 if (!path_data_iter_next (&token, error))
                                         return FALSE;
@@ -507,7 +517,9 @@ gxps_path_parse (const gchar *data,
                                         path_data_parse_error (&token, PD_TOKEN_NUMBER, error);
                                         return FALSE;
                                 }
+#ifdef GXPS_ENABLE_DEBUG
                                 fsweep = token.number;
+#endif
 
                                 if (!path_data_iter_next (&token, error))
                                         return FALSE;


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