Nested declarations are easy to avoid, and doing so avoids at least
libvirt's choice of compiler warnings.
* lib/strerror_r.c (strerror_r): Hoist extern declaration to top
level.
Signed-off-by: Eric Blake <eblake@redhat.com>
2012-03-29 Eric Blake <eblake@redhat.com>
+ strerror_r: avoid compiler warning
+ * lib/strerror_r.c (strerror_r): Hoist extern declaration to top
+ level.
+
fflush: avoid compiler warning
* lib/fflush.c (update_fpos_cache): Mark variables that are
potentially unused.
#if (__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__) && HAVE___XPG_STRERROR_R /* glibc >= 2.3.4, cygwin >= 1.7.9 */
# define USE_XPG_STRERROR_R 1
+extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
#elif HAVE_DECL_STRERROR_R && !(__GLIBC__ >= 2 || defined __UCLIBC__ || defined __CYGWIN__)
#if USE_XPG_STRERROR_R
{
- extern int __xpg_strerror_r (int errnum, char *buf, size_t buflen);
-
ret = __xpg_strerror_r (errnum, buf, buflen);
if (ret < 0)
ret = errno;