aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/krb5.c12
-rw-r--r--lib/setup.h9
2 files changed, 15 insertions, 6 deletions
diff --git a/lib/krb5.c b/lib/krb5.c
index 74a6b572b..34329dc6a 100644
--- a/lib/krb5.c
+++ b/lib/krb5.c
@@ -83,16 +83,16 @@ krb5_check_prot(void *app_data, int level)
}
static int
-krb5_decode(void *app_data, void *buf, int len, int level,
- struct connectdata *conn)
+krb5_decode(void *app_data, void *buf, int len,
+ int level UNUSED_PARAM,
+ struct connectdata *conn UNUSED_PARAM)
{
gss_ctx_id_t *context = app_data;
OM_uint32 maj, min;
gss_buffer_desc enc, dec;
- /* shut gcc up */
- level = 0;
- conn = NULL;
+ (void)level;
+ (void)conn;
enc.value = buf;
enc.length = len;
@@ -122,7 +122,7 @@ krb5_overhead(void *app_data, int level, int len)
static int
krb5_encode(void *app_data, const void *from, int length, int level, void **to,
- struct connectdata *conn)
+ struct connectdata *conn UNUSED_PARAM)
{
gss_ctx_id_t *context = app_data;
gss_buffer_desc dec, enc;
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.
*/