[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Thu Jun 13 08:28:02 UTC 2019
The branch, master has been updated
via fef8ec20d0f lib ldb ldb_key_value: csbuild unused parm ldb_kv
via dc348f41498 lib ldb_key_value: csbuild unused parm key
via 96442401479 lib ldb ldb_key_value: csbuild fix unused parm data
via 566ca19482a lib ldb ldb_key_value: csbuild fix signed unsigned compare
via a538c31aa4e lib ldb ldb_key_value: csbuild unused parms ldb_kv, key
via d6a596d9da0 lib ldb ldb_key_value: csbuild ldb_kv_index_dn_not unused parms
via c20ca0debe6 lib ldb ldb_key_value: csbuild unused parm ldb
via bf13c17f689 lib ldb ldb_key_value: csbuild unused parm tdb
via 5081d146bb7 lib ldb ldb_key_value: csbuild fix integer comparison
via 9284cc19d4b lib ldb ldb_key_value: csbuild unused parm ldb_kv_timeout
via b78597e1cd0 lib ldb: csbuild add lib/util/attr.h to dist
via 1593f77658c lib ldb ldb_key_value: csbuild unused parm ldb_kv
via 8d2cfd45f84 lib ldb ldb_key_value: csbuild unused parm module
via 883c738571c lib ldb ldb_key_value: csbuild unused parm module
via 357bac2072a lib audit_logging tests: csbuild unused parms
via ea7c4ac99d6 auth auth_log: csbuild unused parm transport_protection
via ae4461dce98 auth auth_log: csbuild unused parm unix_username
from bf6620c5f33 torture: Use two connections in SMB2 sharemode tests
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fef8ec20d0f591f2e531a649108ca83c5a4fd744
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Thu Jun 13 08:49:16 2019 +1200
lib ldb ldb_key_value: csbuild unused parm ldb_kv
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_search.c: scope_hint: In
function ‘search_func’ lib/ldb/ldb_key_value/ldb_kv_search.c:308:47:
warning: unused parameter ‘ldb_kv’ [-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Thu Jun 13 08:27:12 UTC 2019 on sn-devel-184
commit dc348f4149890b2a028e60d74fd05b11c3d1b0de
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 15:25:50 2019 +1200
lib ldb_key_value: csbuild unused parm key
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function ‘re_pack’
lib/ldb/ldb_key_value/ldb_kv_index.c:3416:21: warning: unused parameter
‘key’ [-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 96442401479218d18f6f9800321b9ac3d9c2fb58
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 15:22:45 2019 +1200
lib ldb ldb_key_value: csbuild fix unused parm data
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘delete_index’
lib/ldb/ldb_key_value/ldb_kv_index.c:3221:19: warning: unused parameter
‘data’ [-Wunused-parameter]
Tags unused parameters in callback delete_index with _UNUSED_
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 566ca19482afc3c18fc157be49431b1901e11397
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 15:19:25 2019 +1200
lib ldb ldb_key_value: csbuild fix signed unsigned compare
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_add1’
lib/ldb/ldb_key_value/ldb_kv_index.c:2601:15: warning: comparison of
integer expressions of different signedness: ‘int’ and ‘unsigned int’
[-Wsign-compare]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit a538c31aa4e9e03bb94967a204e032a73a9caae5
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 15:17:01 2019 +1200
lib ldb ldb_key_value: csbuild unused parms ldb_kv, key
Fixes csbuild errors.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘traverse_range_index’
lib/ldb/ldb_key_value/ldb_kv_index.c:1653:56: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1654:20: warning: unused parameter
‘key’ [-Wunused-parameter]
Tags unused parameters in the callback function traverse_range_index with
_UNUSED_
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit d6a596d9da0c5284b9c35e51d11a9096496f8280
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 15:12:11 2019 +1200
lib ldb ldb_key_value: csbuild ldb_kv_index_dn_not unused parms
Fixes csbuild errors.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_dn_not’
lib/ldb/ldb_key_value/ldb_kv_index.c:1503:51: warning: unused parameter
‘module’ [-Wunus ed-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1504:34: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1505:40: warning: unused parameter
‘tree’ [-Wunused-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c:1506:27: warning: unused parameter
‘list’ [-Wunused-parameter]
Tag unused parameters in ldb_kv_index_dn_not with _UNUSED_
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit c20ca0debe68724b1f0a252e274737a24ea83136
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:57:19 2019 +1200
lib ldb ldb_key_value: csbuild unused parm ldb
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘list_intersect’
lib/ldb/ldb_key_value/ldb_kv_index.c:1275:48: warning: unused parameter
‘ldb’ [-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit bf13c17f689e2013ea5154abded8c91621203ee6
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:54:03 2019 +1200
lib ldb ldb_key_value: csbuild unused parm tdb
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_index_traverse_store’
lib/ldb/ldb_key_value/ldb_kv_index.c:779:60: warning: unused parameter
‘tdb’ [-Wunused-parameter]
By tagging the tdb_context parameter in ldb_kv_index_traverse_store as
_UNUSED_
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 5081d146bb72a00df5970c97b2a90874b1ba662e
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:48:53 2019 +1200
lib ldb ldb_key_value: csbuild fix integer comparison
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv_index.c: scope_hint: In function
‘ldb_kv_key_dn_from_idx’
lib/ldb/ldb_key_value/ldb_kv_index.c:545:15: warning: comparison of
integer expressions of different signedness: ‘int’ and ‘unsigned int’
[-Wsign-compare]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 9284cc19d4b25eaab0039b1fceb7b0adb6302107
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:45:31 2019 +1200
lib ldb ldb_key_value: csbuild unused parm ldb_kv_timeout
Fixes csbuild errors.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function ‘ldb_kv_timeout’
lib/ldb/ldb_key_value/ldb_kv.c:1675:51: warning: unused parameter ‘ev’
[-Wunused-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:1676:28: warning: unused parameter ‘te’
[-Wunused-parameter]
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:1677:22: warning: unused parameter ‘t’
[-Wunused-parameter]
Tag the unused variables in ldb_kv_timeout with _UNUSED_
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit b78597e1cd0b0509490747f901a26f163a1f6d30
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Thu Jun 13 08:51:05 2019 +1200
lib ldb: csbuild add lib/util/attr.h to dist
Add lib/util/attr.h to the ldb distribution, to make the _UNUSED_ macro
available.
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 1593f77658cd0b2be7df107da7b33197da5edf7e
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:38:59 2019 +1200
lib ldb ldb_key_value: csbuild unused parm ldb_kv
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c:158:33: warning: unused parameter
‘ldb_kv’ [-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 8d2cfd45f84e166b61a1b80edef113f7410ac954
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:34:44 2019 +1200
lib ldb ldb_key_value: csbuild unused parm module
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function
‘ldb_kv_guid_to_key’
lib/ldb/ldb_key_value/ldb_kv.c:157:43: warning: unused parameter
‘module’ [-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 883c738571c2a0afb52bcda4257eca308f9e0a98
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:29:44 2019 +1200
lib ldb ldb_key_value: csbuild unused parm module
Fixes csbuild error.
Error: COMPILER_WARNING:
lib/ldb/ldb_key_value/ldb_kv.c: scope_hint: In function ‘ldb_kv_key_dn’
lib/ldb/ldb_key_value/ldb_kv.c:109:49: warning: unused parameter
‘module’ [-Wunused-para
meter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 357bac2072adecef4581836f3c0eab4ed75b0cde
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 14:21:41 2019 +1200
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 at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit ea7c4ac99d62def3ceb6caa39e2f82b7c8121bbb
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 13:53:58 2019 +1200
auth auth_log: csbuild unused parm transport_protection
Fixes csbuild errors.
Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function
‘log_successful_authz_event_human_readable’
auth/auth_log.c:728:14: warning: unused parameter ‘transport_protection’
[-Wunused-param
eter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit ae4461dce98a70740d8deabf4859cb96032bdf67
Author: Gary Lockyer <gary at catalyst.net.nz>
Date: Fri Jun 7 13:41:35 2019 +1200
auth auth_log: csbuild unused parm unix_username
Fixes csbuild errors
Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function ‘log_authentication_event_json’
auth/auth_log.c:146:14: warning: unused parameter ‘unix_username’
[-Wunused-parameter]
Error: COMPILER_WARNING:
auth/auth_log.c: scope_hint: In function
‘log_authentication_event_human_readable’
auth/auth_log.c:586:14: warning: unused parameter ‘unix_username’
[-Wunused-parameter]
Signed-off-by: Gary Lockyer <gary at catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
auth/auth_log.c | 8 -----
auth/common_auth.h | 1 -
lib/audit_logging/tests/audit_logging_error_test.c | 26 +++++++--------
lib/audit_logging/tests/audit_logging_test.c | 32 +++++++++----------
lib/ldb/ldb_key_value/ldb_kv.c | 28 ++++++++--------
lib/ldb/ldb_key_value/ldb_kv.h | 7 ++--
lib/ldb/ldb_key_value/ldb_kv_cache.c | 2 +-
lib/ldb/ldb_key_value/ldb_kv_index.c | 37 +++++++++++-----------
lib/ldb/ldb_key_value/ldb_kv_search.c | 5 +--
lib/ldb/wscript | 3 +-
source3/auth/auth.c | 3 +-
source3/winbindd/winbindd_pam.c | 1 -
source4/auth/ntlm/auth.c | 3 +-
source4/auth/ntlm/auth_simple.c | 2 +-
source4/dsdb/samdb/ldb_modules/password_hash.c | 1 -
source4/kdc/hdb-samba4.c | 3 +-
source4/rpc_server/netlogon/dcerpc_netlogon.c | 1 -
source4/rpc_server/samr/samr_password.c | 1 -
18 files changed, 72 insertions(+), 92 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/auth_log.c b/auth/auth_log.c
index d9b83b0ea0d..60bc6334591 100644
--- a/auth/auth_log.c
+++ b/auth/auth_log.c
@@ -143,7 +143,6 @@ static void log_authentication_event_json(
NTSTATUS status,
const char *domain_name,
const char *account_name,
- const char *unix_username,
struct dom_sid *sid,
enum event_id_type event_id,
int debug_level)
@@ -498,7 +497,6 @@ static void log_authentication_event_json(
NTSTATUS status,
const char *domain_name,
const char *account_name,
- const char *unix_username,
struct dom_sid *sid,
enum event_id_type event_id,
int debug_level)
@@ -583,7 +581,6 @@ static void log_authentication_event_human_readable(
NTSTATUS status,
const char *domain_name,
const char *account_name,
- const char *unix_username,
struct dom_sid *sid,
int debug_level)
{
@@ -673,7 +670,6 @@ void log_authentication_event(
NTSTATUS status,
const char *domain_name,
const char *account_name,
- const char *unix_username,
struct dom_sid *sid)
{
/* set the log level */
@@ -693,7 +689,6 @@ void log_authentication_event(
status,
domain_name,
account_name,
- unix_username,
sid,
debug_level);
}
@@ -706,7 +701,6 @@ void log_authentication_event(
status,
domain_name,
account_name,
- unix_username,
sid,
event_id,
debug_level);
@@ -725,7 +719,6 @@ static void log_successful_authz_event_human_readable(
const struct tsocket_address *local,
const char *service_description,
const char *auth_type,
- const char *transport_protection,
struct auth_session_info *session_info,
int debug_level)
{
@@ -796,7 +789,6 @@ void log_successful_authz_event(
local,
service_description,
auth_type,
- transport_protection,
session_info,
debug_level);
}
diff --git a/auth/common_auth.h b/auth/common_auth.h
index 0443c4e8044..9f04c9b9cbb 100644
--- a/auth/common_auth.h
+++ b/auth/common_auth.h
@@ -187,7 +187,6 @@ void log_authentication_event(struct imessaging_context *msg_ctx,
NTSTATUS status,
const char *account_name,
const char *domain_name,
- const char *unix_username,
struct dom_sid *sid);
/*
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),
diff --git a/lib/ldb/ldb_key_value/ldb_kv.c b/lib/ldb/ldb_key_value/ldb_kv.c
index d9b7b0af46a..260087fbfc4 100644
--- a/lib/ldb/ldb_key_value/ldb_kv.c
+++ b/lib/ldb/ldb_key_value/ldb_kv.c
@@ -51,6 +51,7 @@
#include "ldb_kv.h"
#include "ldb_private.h"
+#include "lib/util/attr.h"
/*
prevent memory errors on callbacks
@@ -106,8 +107,7 @@ bool ldb_kv_key_is_normal_record(struct ldb_val key)
note that the key for a record can depend on whether the
dn refers to a case sensitive index record or not
*/
-struct ldb_val ldb_kv_key_dn(struct ldb_module *module,
- TALLOC_CTX *mem_ctx,
+struct ldb_val ldb_kv_key_dn(TALLOC_CTX *mem_ctx,
struct ldb_dn *dn)
{
struct ldb_val key;
@@ -154,9 +154,7 @@ failed:
}
/* The caller is to provide a correctly sized key */
-int ldb_kv_guid_to_key(struct ldb_module *module,
- struct ldb_kv_private *ldb_kv,
- const struct ldb_val *GUID_val,
+int ldb_kv_guid_to_key(const struct ldb_val *GUID_val,
struct ldb_val *key)
{
const char *GUID_prefix = LDB_KV_GUID_KEY_PREFIX;
@@ -186,7 +184,7 @@ int ldb_kv_idx_to_key(struct ldb_module *module,
struct ldb_dn *dn;
if (ldb_kv->cache->GUID_index_attribute != NULL) {
- return ldb_kv_guid_to_key(module, ldb_kv, idx_val, key);
+ return ldb_kv_guid_to_key(idx_val, key);
}
dn = ldb_dn_from_ldb_val(mem_ctx, ldb, idx_val);
@@ -198,7 +196,7 @@ int ldb_kv_idx_to_key(struct ldb_module *module,
return LDB_ERR_OPERATIONS_ERROR;
}
/* form the key */
- *key = ldb_kv_key_dn(module, mem_ctx, dn);
+ *key = ldb_kv_key_dn(mem_ctx, dn);
TALLOC_FREE(dn);
if (!key->data) {
return ldb_module_oom(module);
@@ -226,11 +224,11 @@ struct ldb_val ldb_kv_key_msg(struct ldb_module *module,
int ret;
if (ldb_kv->cache->GUID_index_attribute == NULL) {
- return ldb_kv_key_dn(module, mem_ctx, msg->dn);
+ return ldb_kv_key_dn(mem_ctx, msg->dn);
}
if (ldb_dn_is_special(msg->dn)) {
- return ldb_kv_key_dn(module, mem_ctx, msg->dn);
+ return ldb_kv_key_dn(mem_ctx, msg->dn);
}
guid_val =
@@ -258,7 +256,7 @@ struct ldb_val ldb_kv_key_msg(struct ldb_module *module,
}
key.length = talloc_get_size(key.data);
- ret = ldb_kv_guid_to_key(module, ldb_kv, guid_val, &key);
+ ret = ldb_kv_guid_to_key(guid_val, &key);
if (ret != LDB_SUCCESS) {
errno = EINVAL;
@@ -1312,13 +1310,13 @@ static int ldb_kv_rename(struct ldb_kv_context *ctx)
* Even in GUID index mode we use ltdb_key_dn() as we are
* trying to figure out if this is just a case rename
*/
- key = ldb_kv_key_dn(module, msg, req->op.rename.newdn);
+ key = ldb_kv_key_dn(msg, req->op.rename.newdn);
if (!key.data) {
talloc_free(msg);
return LDB_ERR_OPERATIONS_ERROR;
}
- key_old = ldb_kv_key_dn(module, msg, req->op.rename.olddn);
+ key_old = ldb_kv_key_dn(msg, req->op.rename.olddn);
if (!key_old.data) {
talloc_free(msg);
talloc_free(key.data);
@@ -1672,9 +1670,9 @@ static void ldb_kv_request_done(struct ldb_kv_context *ctx, int error)
req->callback(req, ares);
}
-static void ldb_kv_timeout(struct tevent_context *ev,
- struct tevent_timer *te,
- struct timeval t,
+static void ldb_kv_timeout(_UNUSED_ struct tevent_context *ev,
+ _UNUSED_ struct tevent_timer *te,
+ _UNUSED_ struct timeval t,
void *private_data)
{
struct ldb_kv_context *ctx;
diff --git a/lib/ldb/ldb_key_value/ldb_kv.h b/lib/ldb/ldb_key_value/ldb_kv.h
index 8da970fd2f9..3de29039a98 100644
--- a/lib/ldb/ldb_key_value/ldb_kv.h
+++ b/lib/ldb/ldb_key_value/ldb_kv.h
@@ -276,15 +276,12 @@ int ldb_kv_search(struct ldb_kv_context *ctx);
* DN=@.
*/
bool ldb_kv_key_is_normal_record(struct ldb_val key);
-struct ldb_val ldb_kv_key_dn(struct ldb_module *module,
- TALLOC_CTX *mem_ctx,
+struct ldb_val ldb_kv_key_dn(TALLOC_CTX *mem_ctx,
struct ldb_dn *dn);
struct ldb_val ldb_kv_key_msg(struct ldb_module *module,
TALLOC_CTX *mem_ctx,
const struct ldb_message *msg);
-int ldb_kv_guid_to_key(struct ldb_module *module,
- struct ldb_kv_private *ldb_kv,
- const struct ldb_val *GUID_val,
+int ldb_kv_guid_to_key(const struct ldb_val *GUID_val,
struct ldb_val *key);
int ldb_kv_idx_to_key(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
diff --git a/lib/ldb/ldb_key_value/ldb_kv_cache.c b/lib/ldb/ldb_key_value/ldb_kv_cache.c
index 3d8a09123e0..4a3c9f29020 100644
--- a/lib/ldb/ldb_key_value/ldb_kv_cache.c
+++ b/lib/ldb/ldb_key_value/ldb_kv_cache.c
@@ -444,7 +444,7 @@ int ldb_kv_cache_load(struct ldb_module *module)
goto failed;
}
- key = ldb_kv_key_dn(module, baseinfo, baseinfo_dn);
+ key = ldb_kv_key_dn(baseinfo, baseinfo_dn);
if (!key.data) {
goto failed_and_unlock;
}
diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c b/lib/ldb/ldb_key_value/ldb_kv_index.c
index 5af248a1931..d0916387b11 100644
--- a/lib/ldb/ldb_key_value/ldb_kv_index.c
+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c
@@ -148,6 +148,7 @@ ldb_schema_set_override_GUID_index() must be called.
#include "../ldb_tdb/ldb_tdb.h"
#include "ldb_private.h"
#include "lib/util/binsearch.h"
+#include "lib/util/attr.h"
struct dn_list {
unsigned int count;
@@ -540,7 +541,7 @@ int ldb_kv_key_dn_from_idx(struct ldb_module *module,
--
Samba Shared Repository
More information about the samba-cvs
mailing list