* lib/rename.c (rpl_rename): Avoid compiler warnings seen on Solaris,
by marking the out label as potentially unused.
* m4/gnulib-common.m4: Mention the need for the trailing ; for C++.
Signed-off-by: Ben Walton <bdwalton@gmail.com>
ret_val = rename (src_temp, dst_temp);
rename_errno = errno;
- out:
+
+ out: _GL_UNUSED_LABEL;
+
if (src_temp != src)
free (src_temp);
if (dst_temp != dst)
#define _UNUSED_PARAMETER_ _GL_UNUSED
/* gcc supports the "unused" attribute on possibly unused labels, and
- g++ has since version 4.5. */
+ g++ has since version 4.5. Note to support C++ as well as C,
+ _GL_UNUSED_LABEL should be used with a trailing ; */
#if !defined __cplusplus || __GNUC__ > 4 \
|| (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
# define _GL_UNUSED_LABEL _GL_UNUSED