From cace7471f0aef6b2febd3241f1faaed870cc0af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 6 Mar 2015 19:24:24 +0100 Subject: tests: remove compiler warnings about unused parameters --- tests/unit/core/test-arraylist.cpp | 4 ++++ tests/unit/core/test-hashtable.cpp | 6 ++++++ tests/unit/core/test-string.cpp | 3 +++ 3 files changed, 13 insertions(+) (limited to 'tests/unit') diff --git a/tests/unit/core/test-arraylist.cpp b/tests/unit/core/test-arraylist.cpp index e4ab3a1a7..8564b5589 100644 --- a/tests/unit/core/test-arraylist.cpp +++ b/tests/unit/core/test-arraylist.cpp @@ -65,6 +65,10 @@ int test_cmp_cb (void *data, struct t_arraylist *arraylist, void *pointer1, void *pointer2) { + /* make C++ compiler happy */ + (void) data; + (void) arraylist; + if (!pointer1 || !pointer2) return (pointer1) ? 1 : ((pointer2) ? -1 : 0); diff --git a/tests/unit/core/test-hashtable.cpp b/tests/unit/core/test-hashtable.cpp index 0ff23d239..a5da54b63 100644 --- a/tests/unit/core/test-hashtable.cpp +++ b/tests/unit/core/test-hashtable.cpp @@ -58,6 +58,9 @@ TEST(Hashtable, HashDbj2) unsigned long long test_hashtable_hash_key_cb (struct t_hashtable *hashtable, const void *key) { + /* make C++ compiler happy */ + (void) hashtable; + return hashtable_hash_key_djb2 ((const char *)key) + 1; } @@ -71,6 +74,9 @@ int test_hashtable_keycmp_cb (struct t_hashtable *hashtable, const void *key1, const void *key2) { + /* make C++ compiler happy */ + (void) hashtable; + return strcmp ((const char *)key1, (const char *)key2); } diff --git a/tests/unit/core/test-string.cpp b/tests/unit/core/test-string.cpp index 73a88b5ca..20a782cc8 100644 --- a/tests/unit/core/test-string.cpp +++ b/tests/unit/core/test-string.cpp @@ -567,6 +567,9 @@ TEST(String, Highlight) char * test_replace_cb (void *data, const char *text) { + /* make C++ compiler happy */ + (void) data; + if (strcmp (text, "abc") == 0) return strdup ("def"); -- cgit v1.2.3