diff options
author | Martin Pool <mbp@samba.org> | 2002-01-09 05:27:59 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-09 05:27:59 +0000 |
commit | b29775d442c36f667a6db5ba9dbe47d1a133525f (patch) | |
tree | 7c4ab50554736df86741537f3c25e3a6e8a5dd67 /source | |
parent | 3ef135e91aaebf9648c4dd13f59686f57f4cff70 (diff) | |
download | samba-b29775d442c36f667a6db5ba9dbe47d1a133525f.tar.gz samba-b29775d442c36f667a6db5ba9dbe47d1a133525f.tar.xz samba-b29775d442c36f667a6db5ba9dbe47d1a133525f.zip |
Add UNUSED(paramname) macro to be used in parameter lists, to quieten
gcc warnings about unused parameters.
Diffstat (limited to 'source')
-rw-r--r-- | source/include/includes.h | 11 | ||||
-rw-r--r-- | source/smbd/server.c | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/source/include/includes.h b/source/include/includes.h index 6021ebb83b0..fa6fad46050 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -2,9 +2,9 @@ #define _INCLUDES_H /* Unix SMB/Netbios implementation. - Version 1.9. Machine customisation and include handling Copyright (C) Andrew Tridgell 1994-1998 + Copyright (C) 2002 by Martin Pool <mbp@samba.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,6 +63,15 @@ #define PRINTF_ATTRIBUTE(a1, a2) #endif +#ifdef __GNUC__ +/** gcc attribute used on function parameters so that it does not emit + * warnings about them being unused. **/ +# define UNUSED(param) param __attribute__ ((unused)) +#else +# define UNUSED(param) param +/** Feel free to add definitions for other compilers here. */ +#endif + #ifdef RELIANTUNIX /* * <unistd.h> has to be included before any other to get diff --git a/source/smbd/server.c b/source/smbd/server.c index 08bcf22dd29..a8c1bc5c15e 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -80,7 +80,8 @@ static void killkids(void) process a sam sync message - not sure whether to do this here or somewhere else ****************************************************************************/ -static void msg_sam_sync(int msg_type, pid_t pid, void *buf, size_t len) +static void msg_sam_sync(int UNUSED(msg_type), pid_t UNUSED(pid), + void *UNUSED(buf), size_t UNUSED(len)) { DEBUG(10, ("** sam sync message received, ignoring\n")); } |