Avoid unused variable warnings in g_ascii_strtod
authorMatthias Clasen <mclasen@redhat.com>
Tue, 15 Nov 2011 04:30:18 +0000 (23:30 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 15 Nov 2011 04:30:18 +0000 (23:30 -0500)
glib/gstrfuncs.c

index 528e660..1d5e371 100644 (file)
@@ -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 ();