diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-07-12 23:24:52 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-07-12 23:24:52 +0200 |
commit | ee4ed461288ec74641e3b96d5508628c07f689b0 (patch) | |
tree | 9c9e5a463346a77ad4cb8536356c8f567ee24e64 /lib/setup.h | |
parent | 2af0287856ca0ba7fc4d80bf94e46bb2d4c6d96c (diff) | |
download | curl-ee4ed461288ec74641e3b96d5508628c07f689b0.tar.gz |
silence picky compilers: mark unused parameters
Modern gcc versions (4.6.X) get more picky by default and have started
to warn for unused parameters, but luckily gcc also allows us to mark
them as unused so that we can avoid the warnings.
Diffstat (limited to 'lib/setup.h')
-rw-r--r-- | lib/setup.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/setup.h b/lib/setup.h index 1e96c76dd..35dfa5874 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -580,6 +580,15 @@ int netware_init(void); #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif +/* Provide a mechanism to silence picky compilers, such as gcc 4.6+. + Parameters should of course normally not be unused, but for example when we + have multiple implementations of the same interface it may happen. */ +#ifndef __GNUC__ +#define UNUSED_PARAM /*NOTHING*/ +#else +#define UNUSED_PARAM __attribute__((unused)) +#endif + /* * Include macros and defines that should only be processed once. */ |