1
0
forked from bip/bip

Fix GCC warnings.

This commit is contained in:
Arnaud Fontaine 2011-10-03 15:25:26 +09:00 committed by Pierre-Louis Bonicoli
parent ab0a41b7bb
commit a46b8bd2c2
4 changed files with 23 additions and 6 deletions

View File

@ -29,6 +29,15 @@ AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
AX_C___ATTRIBUTE__
AH_BOTTOM([
/* Unused attributes such as function parameters (GCC extension) */
#ifdef HAVE___ATTRIBUTE__
# define UNUSED(ATTRIBUTE) ATTRIBUTE __attribute__((unused))
#else
# define UNUSED(ATTRIBUTE) ATTRIBUTE
#endif])
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC

View File

@ -161,6 +161,9 @@
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
/* define if your compiler has __attribute__ */
#undef HAVE___ATTRIBUTE__
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
@ -263,3 +266,11 @@
/* Define as `fork' if `vfork' does not work. */
#undef vfork
/* Unused attributes such as function parameters (GCC extension) */
#ifdef HAVE___ATTRIBUTE__
# define UNUSED(ATTRIBUTE) ATTRIBUTE __attribute__((unused))
#else
# define UNUSED(ATTRIBUTE) ATTRIBUTE
#endif

View File

@ -1090,8 +1090,7 @@ static DH *dh_1024(void)
}
/* ripped from postfix's tls_dh.c */
static DH *tmp_dh_cb(SSL *ssl_unused __attribute__((unused)),
int export, int keylength)
static DH *tmp_dh_cb(UNUSED(SSL *ssl_unused), int export, int keylength)
{
DH *ret;

View File

@ -308,8 +308,7 @@ static int irc_352(struct link_server *server, struct line *line)
return OK_COPY_WHO;
}
static int irc_315(struct link_server *server,
struct line *l __attribute__((unused)))
static int irc_315(struct link_server *server, UNUSED(struct line *l))
{
struct link *link = LINK(server);
if (link->who_client) {
@ -1455,8 +1454,7 @@ static int irc_367(struct link_server *server, struct line *l)
}
/* same as irc_315 */
static int irc_368(struct link_server *server,
struct line *l __attribute__((unused)))
static int irc_368(struct link_server *server, UNUSED(struct line *l))
{
struct link *link = LINK(server);
if (link->who_client) {