vasnprintf.c: Avoid warning about unused label
authorJim Meyering <meyering@redhat.com>
Tue, 29 Jan 2008 09:32:15 +0000 (10:32 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 29 Jan 2008 09:36:47 +0000 (10:36 +0100)
* lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
"overflow" label definition and associated code with the
same cpp condition that guards the sole use of that label.

ChangeLog
lib/vasnprintf.c

index cd79bb6ada14624fa8c18ec6b3361fa15290b23b..0c2b3e0cf70052419e5f302aec87444574354790 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-29  Jim Meyering  <meyering@redhat.com>
+
+       vasnprintf.c: Avoid warning about unused label
+       * lib/vasnprintf.c (VASNPRINTF) [!USE_SNPRINTF]: Guard the
+       "overflow" label definition and associated code with the
+       same cpp condition that guards the sole use of that label.
+
 2008-01-26  Bruno Haible  <bruno@clisp.org>
 
        * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM,
index 7e533be1f8bbcd2e858cc8fa595011c13808e1bb..19cc009a3e80920f9ed90e633f49c6a749f8ac26 100644 (file)
@@ -4327,7 +4327,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
                    if (prec_ourselves)
                      {
                        /* Handle the precision.  */
-                       TCHAR_T *prec_ptr = 
+                       TCHAR_T *prec_ptr =
 # if USE_SNPRINTF
                          (TCHAR_T *) (result + length);
 # else
@@ -4654,6 +4654,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
        not have this limitation.  */
     return result;
 
+#if USE_SNPRINTF
   overflow:
     if (!(result == resultbuf || result == NULL))
       free (result);
@@ -4662,6 +4663,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
     CLEANUP ();
     errno = EOVERFLOW;
     return NULL;
+#endif
 
   out_of_memory:
     if (!(result == resultbuf || result == NULL))