[libgxps/wip/nacho/visibility: 4/13] path: avoid set but not used warnings



commit bf093cb3f5da8551ddc7727634587022897b5bbf
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 |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/libgxps/gxps-path.c b/libgxps/gxps-path.c
index 4f5c2f6..88cde02 100644
--- a/libgxps/gxps-path.c
+++ b/libgxps/gxps-path.c
@@ -476,7 +476,10 @@ 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
+                                gdouble rx, farc, fsweep;
+#endif
 
                                 if (!path_data_get_point (&token, &xr, &yr, error))
                                         return FALSE;
@@ -487,7 +490,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;
@@ -495,7 +500,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;
@@ -503,7 +510,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]