summaryrefslogtreecommitdiff
path: root/lib/audit_logging
diff options
context:
space:
mode:
authorGary Lockyer <gary@catalyst.net.nz>2019-06-07 14:21:41 +1200
committerAndreas Schneider <asn@cryptomilk.org>2019-06-13 07:16:22 +0000
commit357bac2072adecef4581836f3c0eab4ed75b0cde (patch)
treeeb228c967550358edff423fc67faba6972eab66e /lib/audit_logging
parentea7c4ac99d62def3ceb6caa39e2f82b7c8121bbb (diff)
downloadsamba-357bac2072adecef4581836f3c0eab4ed75b0cde.tar.gz
lib audit_logging tests: csbuild unused parms
Fixes csbuild unused parameter error: warning: unused parameter ‘state’ warning: unused parameter ‘argc’ warning: unused parameter ‘argv’ By adding _UNUSED_ to paramter declaration. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'lib/audit_logging')
-rw-r--r--lib/audit_logging/tests/audit_logging_error_test.c26
-rw-r--r--lib/audit_logging/tests/audit_logging_test.c32
2 files changed, 29 insertions, 29 deletions
diff --git a/lib/audit_logging/tests/audit_logging_error_test.c b/lib/audit_logging/tests/audit_logging_error_test.c
index 1c0929a1b99..b441bdcb138 100644
--- a/lib/audit_logging/tests/audit_logging_error_test.c
+++ b/lib/audit_logging/tests/audit_logging_error_test.c
@@ -279,7 +279,7 @@ char *__wrap_tsocket_address_string(const struct tsocket_address *addr,
return __real_tsocket_address_string(addr, mem_ctx);
}
-static void test_json_add_int(void **state)
+static void test_json_add_int(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -308,7 +308,7 @@ static void test_json_add_int(void **state)
json_free(&object);
}
-static void test_json_add_bool(void **state)
+static void test_json_add_bool(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -329,7 +329,7 @@ static void test_json_add_bool(void **state)
json_free(&object);
}
-static void test_json_add_string(void **state)
+static void test_json_add_string(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -369,7 +369,7 @@ static void test_json_add_string(void **state)
json_free(&object);
}
-static void test_json_add_object(void **state)
+static void test_json_add_object(_UNUSED_ void **state)
{
struct json_object object;
struct json_object value;
@@ -404,7 +404,7 @@ static void test_json_add_object(void **state)
json_free(&value);
}
-static void test_json_add_to_array(void **state)
+static void test_json_add_to_array(_UNUSED_ void **state)
{
struct json_object array;
struct json_object value;
@@ -439,7 +439,7 @@ static void test_json_add_to_array(void **state)
json_free(&value);
}
-static void test_json_add_timestamp(void **state)
+static void test_json_add_timestamp(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -489,7 +489,7 @@ static void test_json_add_timestamp(void **state)
json_free(&object);
}
-static void test_json_add_stringn(void **state)
+static void test_json_add_stringn(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -537,7 +537,7 @@ static void test_json_add_stringn(void **state)
json_free(&object);
}
-static void test_json_add_version(void **state)
+static void test_json_add_version(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -618,7 +618,7 @@ static void test_json_add_version(void **state)
json_free(&object);
}
-static void test_json_add_address(void **state)
+static void test_json_add_address(_UNUSED_ void **state)
{
struct json_object object;
int rc = 0;
@@ -745,7 +745,7 @@ static void test_json_add_guid(void **state)
json_free(&object);
}
-static void test_json_to_string(void **state)
+static void test_json_to_string(_UNUSED_ void **state)
{
struct json_object object;
char *s = NULL;
@@ -775,7 +775,7 @@ static void test_json_to_string(void **state)
json_free(&object);
}
-static void test_json_get_array(void **state)
+static void test_json_get_array(_UNUSED_ void **state)
{
struct json_object object;
struct json_object stored_array;
@@ -814,7 +814,7 @@ static void test_json_get_array(void **state)
json_free(&object);
}
-static void test_json_get_object(void **state)
+static void test_json_get_object(_UNUSED_ void **state)
{
struct json_object object;
struct json_object stored;
@@ -845,7 +845,7 @@ static void test_json_get_object(void **state)
json_free(&object);
}
-int main(int argc, const char **argv)
+int main(_UNUSED_ int argc, _UNUSED_ const char **argv)
{
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_json_add_int),
diff --git a/lib/audit_logging/tests/audit_logging_test.c b/lib/audit_logging/tests/audit_logging_test.c
index acd2a4f697f..1efb03b0b51 100644
--- a/lib/audit_logging/tests/audit_logging_test.c
+++ b/lib/audit_logging/tests/audit_logging_test.c
@@ -59,7 +59,7 @@
#include "lib/audit_logging/audit_logging.h"
-static void test_json_add_int(void **state)
+static void test_json_add_int(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -101,7 +101,7 @@ static void test_json_add_int(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_bool(void **state)
+static void test_json_add_bool(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -133,7 +133,7 @@ static void test_json_add_bool(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_string(void **state)
+static void test_json_add_string(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -173,7 +173,7 @@ static void test_json_add_string(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_object(void **state)
+static void test_json_add_object(_UNUSED_ void **state)
{
struct json_object object;
struct json_object other;
@@ -214,7 +214,7 @@ static void test_json_add_object(void **state)
json_free(&after);
}
-static void test_json_add_to_array(void **state)
+static void test_json_add_to_array(_UNUSED_ void **state)
{
struct json_object array;
struct json_object o1;
@@ -271,7 +271,7 @@ static void test_json_add_to_array(void **state)
json_free(&after);
}
-static void test_json_add_timestamp(void **state)
+static void test_json_add_timestamp(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *ts = NULL;
@@ -338,7 +338,7 @@ static void test_json_add_timestamp(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_stringn(void **state)
+static void test_json_add_stringn(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -405,7 +405,7 @@ static void test_json_add_stringn(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_version(void **state)
+static void test_json_add_version(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *version = NULL;
@@ -443,7 +443,7 @@ static void test_json_add_version(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_address(void **state)
+static void test_json_add_address(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -522,7 +522,7 @@ static void test_json_add_address(void **state)
TALLOC_FREE(ctx);
}
-static void test_json_add_sid(void **state)
+static void test_json_add_sid(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -560,7 +560,7 @@ static void test_json_add_sid(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_add_guid(void **state)
+static void test_json_add_guid(_UNUSED_ void **state)
{
struct json_object object;
struct json_t *value = NULL;
@@ -600,7 +600,7 @@ static void test_json_add_guid(void **state)
assert_int_equal(JSON_ERROR, rc);
}
-static void test_json_to_string(void **state)
+static void test_json_to_string(_UNUSED_ void **state)
{
struct json_object object;
char *s = NULL;
@@ -634,7 +634,7 @@ static void test_json_to_string(void **state)
TALLOC_FREE(ctx);
}
-static void test_json_get_array(void **state)
+static void test_json_get_array(_UNUSED_ void **state)
{
struct json_object object;
struct json_object array;
@@ -730,7 +730,7 @@ static void test_json_get_array(void **state)
json_free(&array);
}
-static void test_json_get_object(void **state)
+static void test_json_get_object(_UNUSED_ void **state)
{
struct json_object object;
struct json_object o1;
@@ -788,7 +788,7 @@ static void test_json_get_object(void **state)
json_free(&o3);
}
-static void test_audit_get_timestamp(void **state)
+static void test_audit_get_timestamp(_UNUSED_ void **state)
{
const char *t = NULL;
char *c;
@@ -829,7 +829,7 @@ static void test_audit_get_timestamp(void **state)
TALLOC_FREE(ctx);
}
-int main(int argc, const char **argv)
+int main(_UNUSED_ int argc, _UNUSED_ const char **argv)
{
const struct CMUnitTest tests[] = {
cmocka_unit_test(test_json_add_int),