aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-06-04 22:42:13 +0000
committerNick Mathewson <nickm@torproject.org>2006-06-04 22:42:13 +0000
commit853e2d99b64cc886377f95b8f74e9f549769c410 (patch)
tree3c5949273d8d13229b51bdb8a2ecf4581d27dd18 /src/common
parentc4647545a02bd5f6b28bdb2bcd50a915ef04cf8c (diff)
downloadtor-853e2d99b64cc886377f95b8f74e9f549769c410.tar
tor-853e2d99b64cc886377f95b8f74e9f549769c410.tar.gz
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
svn:r6532
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c1
-rw-r--r--src/common/crypto.c2
-rw-r--r--src/common/util.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 7867c0b89..354af77ea 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -160,6 +160,7 @@ void
tor_munmap_file(const char *memory, size_t size)
{
char *mem = (char*) memory;
+ (void)size;
tor_free(mem);
}
#endif
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 429df04b1..ac2388011 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1802,6 +1802,8 @@ secret_to_key(char *key_out, size_t key_out_len, const char *secret,
static void
_openssl_locking_cb(int mode, int n, const char *file, int line)
{
+ (void)file;
+ (void)line;
if (!_openssl_mutexes)
/* This is not a really good fix for the
* "release-freed-lock-from-separate-thread-on-shutdown" problem, but
diff --git a/src/common/util.c b/src/common/util.c
index 291aa1437..fea53c5a1 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -950,6 +950,8 @@ clean_name_for_stat(char *name)
return;
name[len-1]='\0';
}
+#else
+ (void)name;
#endif
}