[glib] Avoid unused variable warnings in g_ascii_strtod



commit 65eb65b7779e5e6ec72de9bb372568d88b1ec7bb
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 14 23:30:18 2011 -0500

    Avoid unused variable warnings in g_ascii_strtod

 glib/gstrfuncs.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index 528e660..1d5e371 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -683,6 +683,16 @@ gdouble
 g_ascii_strtod (const gchar *nptr,
                 gchar      **endptr)
 {
+#ifdef HAVE_STRTOD_L
+
+  g_return_val_if_fail (nptr != NULL, 0);
+
+  errno = 0;
+
+  return strtod_l (nptr, endptr, get_C_locale ());
+
+#else
+
   gchar *fail_pos;
   gdouble val;
   struct lconv *locale_data;
@@ -694,12 +704,6 @@ g_ascii_strtod (const gchar *nptr,
 
   g_return_val_if_fail (nptr != NULL, 0);
 
-#ifdef HAVE_STRTOD_L
-  errno = 0;
-
-  return strtod_l (nptr, endptr, get_C_locale ());
-#else
-
   fail_pos = NULL;
 
   locale_data = localeconv ();



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