From f7a926a4684e62bcd74fa731ad194eb768276b9f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 29 Jan 2008 10:32:15 +0100 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ lib/vasnprintf.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cd79bb6ad..0c2b3e0cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-01-29 Jim Meyering + + 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 * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM, diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 7e533be1f..19cc009a3 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -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)) -- 2.11.0