summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/Makefile2
-rw-r--r--source4/cluster/ctdb/brlock_ctdb.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c8
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c8
-rw-r--r--source4/dsdb/schema/schema_description.c12
-rw-r--r--source4/dsdb/schema/schema_query.c38
-rw-r--r--source4/lib/events/tevent_s4.c4
-rw-r--r--source4/lib/ldb/modules/operational.c8
-rw-r--r--source4/lib/tls/tls.c20
-rw-r--r--source4/libcli/security/security_descriptor.c1
-rw-r--r--source4/ntvfs/common/brlock.c4
-rw-r--r--source4/ntvfs/common/brlock.h6
-rw-r--r--source4/ntvfs/ipc/ipc_rap.c2
-rw-r--r--source4/ntvfs/posix/pvfs_resolve.c6
-rw-r--r--source4/torture/libnet/libnet_rpc.c26
-rw-r--r--source4/torture/raw/lookuprate.c2
-rw-r--r--source4/torture/raw/tconrate.c1
-rw-r--r--source4/torture/rpc/netlogon.c1
-rw-r--r--source4/torture/rpc/samr.c2
-rw-r--r--source4/torture/rpc/schannel.c10
-rw-r--r--source4/utils/ad2oLschema.c4
-rw-r--r--source4/web_server/wsgi.c4
-rw-r--r--source4/winbind/wb_init_domain.c1
23 files changed, 81 insertions, 95 deletions
diff --git a/source4/Makefile b/source4/Makefile
index 442a62ef62..fff2dbf544 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -144,7 +144,7 @@ include $(srcdir)/static_deps.mk
endif
clean::
- @find ../lib ../libcli -name '*.o' -o -name '*.ho' | xargs rm -f
+ @find ../lib ../libcli ../librpc ../nsswitch -name '*.o' -o -name '*.ho' | xargs rm -f
DEFAULT_HEADERS = $(srcdir)/../lib/util/dlinklist.h \
$(srcdir)/version.h
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c
index 01d60901a6..1cc6beb789 100644
--- a/source4/cluster/ctdb/brlock_ctdb.c
+++ b/source4/cluster/ctdb/brlock_ctdb.c
@@ -378,7 +378,7 @@ reply:
*/
static NTSTATUS brl_ctdb_lock(struct brl_context *brl,
struct brl_handle *brlh,
- uint16_t smbpid,
+ uint32_t smbpid,
uint64_t start, uint64_t size,
enum brl_type lock_type,
void *notify_ptr)
@@ -609,7 +609,7 @@ found:
*/
static NTSTATUS brl_ctdb_unlock(struct brl_context *brl,
struct brl_handle *brlh,
- uint16_t smbpid,
+ uint32_t smbpid,
uint64_t start, uint64_t size)
{
struct ctdb_call call;
@@ -782,7 +782,7 @@ static int brl_ctdb_locktest_func(struct ctdb_call_info *call)
*/
static NTSTATUS brl_ctdb_locktest(struct brl_context *brl,
struct brl_handle *brlh,
- uint16_t smbpid,
+ uint32_t smbpid,
uint64_t start, uint64_t size,
enum brl_type lock_type)
{
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 275e9b5299..bb95c7ee5a 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -93,7 +93,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
struct ldb_message_element *allowedAttributes;
const struct dsdb_schema *schema = dsdb_get_schema(ldb);
TALLOC_CTX *mem_ctx;
- char **objectclass_list, **attr_list;
+ const char **objectclass_list, **attr_list;
int i, ret;
/* If we don't have a schema yet, we can't do anything... */
@@ -118,7 +118,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
we alter the element array in ldb_msg_add_empty() */
oc_el = ldb_msg_find_element(msg, "objectClass");
- objectclass_list = talloc_array(mem_ctx, char *, oc_el->num_values + 1);
+ objectclass_list = talloc_array(mem_ctx, const char *, oc_el->num_values + 1);
if (!objectclass_list) {
ldb_oom(ldb);
talloc_free(mem_ctx);
@@ -126,11 +126,11 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess
}
for (i=0; oc_el && i < oc_el->num_values; i++) {
- objectclass_list[i] = (char *)oc_el->values[i].data;
+ objectclass_list[i] = (const char *)oc_el->values[i].data;
}
objectclass_list[i] = NULL;
- attr_list = dsdb_full_attribute_list(mem_ctx, schema, (const char **)objectclass_list, DSDB_SCHEMA_ALL);
+ attr_list = dsdb_full_attribute_list(mem_ctx, schema, objectclass_list, DSDB_SCHEMA_ALL);
if (!attr_list) {
ldb_asprintf_errstring(ldb, "kludge_acl: Failed to get list of attributes create %s attribute", attrName);
talloc_free(mem_ctx);
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 0d2ce64604..0000c87f72 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -1065,11 +1065,11 @@ static int partition_extended(struct ldb_module *module, struct ldb_request *req
static int partition_sort_compare(const void *v1, const void *v2)
{
- struct dsdb_control_current_partition *p1;
- struct dsdb_control_current_partition *p2;
+ const struct dsdb_control_current_partition *p1;
+ const struct dsdb_control_current_partition *p2;
- p1 = *((struct dsdb_control_current_partition **)v1);
- p2 = *((struct dsdb_control_current_partition **)v2);
+ p1 = *((struct dsdb_control_current_partition * const*)v1);
+ p2 = *((struct dsdb_control_current_partition * const*)v2);
return ldb_dn_compare(p1->dn, p2->dn);
}
diff --git a/source4/dsdb/schema/schema_description.c b/source4/dsdb/schema/schema_description.c
index 5474eb5074..d616f3bb9b 100644
--- a/source4/dsdb/schema/schema_description.c
+++ b/source4/dsdb/schema/schema_description.c
@@ -215,8 +215,8 @@ char *schema_class_description(TALLOC_CTX *mem_ctx,
const char **auxillary_classes,
const char *subClassOf,
int objectClassCategory,
- char **must,
- char **may,
+ const char **must,
+ const char **may,
const char *schemaHexGUID)
{
char *schema_entry = talloc_asprintf(mem_ctx,
@@ -343,10 +343,10 @@ char *schema_class_to_dITContentRule(TALLOC_CTX *mem_ctx, const struct dsdb_clas
{
int i;
char *schema_description;
- char **aux_class_list = NULL;
- char **attrs;
- char **must_attr_list = NULL;
- char **may_attr_list = NULL;
+ const char **aux_class_list = NULL;
+ const char **attrs;
+ const char **must_attr_list = NULL;
+ const char **may_attr_list = NULL;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
const struct dsdb_class *aux_class;
if (!tmp_ctx) {
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index ca26ffd206..f848fee365 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -212,18 +212,18 @@ WERROR dsdb_linked_attribute_lDAPDisplayName_list(const struct dsdb_schema *sche
return WERR_OK;
}
-char **merge_attr_list(TALLOC_CTX *mem_ctx,
- char **attrs, const char **new_attrs)
+const char **merge_attr_list(TALLOC_CTX *mem_ctx,
+ const char **attrs, const char * const*new_attrs)
{
- char **ret_attrs;
+ const char **ret_attrs;
int i;
- size_t new_len, orig_len = str_list_length((const char **)attrs);
+ size_t new_len, orig_len = str_list_length(attrs);
if (!new_attrs) {
return attrs;
}
ret_attrs = talloc_realloc(mem_ctx,
- attrs, char *, orig_len + str_list_length(new_attrs) + 1);
+ attrs, const char *, orig_len + str_list_length(new_attrs) + 1);
if (ret_attrs) {
for (i=0; i < str_list_length(new_attrs); i++) {
ret_attrs[orig_len + i] = new_attrs[i];
@@ -241,9 +241,9 @@ char **merge_attr_list(TALLOC_CTX *mem_ctx,
considering subclasses, auxillary classes etc)
*/
-char **dsdb_attribute_list(TALLOC_CTX *mem_ctx, const struct dsdb_class *class, enum dsdb_attr_list_query query)
+const char **dsdb_attribute_list(TALLOC_CTX *mem_ctx, const struct dsdb_class *class, enum dsdb_attr_list_query query)
{
- char **attr_list = NULL;
+ const char **attr_list = NULL;
switch (query) {
case DSDB_SCHEMA_ALL_MAY:
attr_list = merge_attr_list(mem_ctx, attr_list, class->mayContain);
@@ -281,7 +281,7 @@ char **dsdb_attribute_list(TALLOC_CTX *mem_ctx, const struct dsdb_class *class,
return attr_list;
}
-static char **dsdb_full_attribute_list_internal(TALLOC_CTX *mem_ctx,
+static const char **dsdb_full_attribute_list_internal(TALLOC_CTX *mem_ctx,
const struct dsdb_schema *schema,
const char **class_list,
enum dsdb_attr_list_query query)
@@ -289,39 +289,39 @@ static char **dsdb_full_attribute_list_internal(TALLOC_CTX *mem_ctx,
int i;
const struct dsdb_class *class;
- char **attr_list = NULL;
- char **this_class_list;
- char **recursive_list;
+ const char **attr_list = NULL;
+ const char **this_class_list;
+ const char **recursive_list;
for (i=0; class_list && class_list[i]; i++) {
class = dsdb_class_by_lDAPDisplayName(schema, class_list[i]);
this_class_list = dsdb_attribute_list(mem_ctx, class, query);
- attr_list = merge_attr_list(mem_ctx, attr_list, (const char **)this_class_list);
+ attr_list = merge_attr_list(mem_ctx, attr_list, this_class_list);
recursive_list = dsdb_full_attribute_list_internal(mem_ctx, schema,
class->systemAuxiliaryClass,
query);
- attr_list = merge_attr_list(mem_ctx, attr_list, (const char **)recursive_list);
+ attr_list = merge_attr_list(mem_ctx, attr_list, recursive_list);
recursive_list = dsdb_full_attribute_list_internal(mem_ctx, schema,
class->auxiliaryClass,
query);
- attr_list = merge_attr_list(mem_ctx, attr_list, (const char **)recursive_list);
+ attr_list = merge_attr_list(mem_ctx, attr_list, recursive_list);
}
return attr_list;
}
-char **dsdb_full_attribute_list(TALLOC_CTX *mem_ctx,
+const char **dsdb_full_attribute_list(TALLOC_CTX *mem_ctx,
const struct dsdb_schema *schema,
const char **class_list,
enum dsdb_attr_list_query query)
{
- char **attr_list = dsdb_full_attribute_list_internal(mem_ctx, schema, class_list, query);
- size_t new_len = str_list_length((const char **)attr_list);
+ const char **attr_list = dsdb_full_attribute_list_internal(mem_ctx, schema, class_list, query);
+ size_t new_len = str_list_length(attr_list);
/* Remove duplicates */
if (new_len > 1) {
@@ -331,8 +331,8 @@ char **dsdb_full_attribute_list(TALLOC_CTX *mem_ctx,
(comparison_fn_t)strcasecmp);
for (i=1 ; i < new_len; i++) {
- char **val1 = &attr_list[i-1];
- char **val2 = &attr_list[i];
+ const char **val1 = &attr_list[i-1];
+ const char **val2 = &attr_list[i];
if (ldb_attr_cmp(*val1, *val2) == 0) {
memmove(val1, val2, (new_len - i) * sizeof( *attr_list));
new_len--;
diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c
index 80267fdd22..e711e43761 100644
--- a/source4/lib/events/tevent_s4.c
+++ b/source4/lib/events/tevent_s4.c
@@ -17,8 +17,8 @@
*/
#include "includes.h"
-#include "tevent.h"
-#include "tevent_internal.h"
+#include <tevent.h>
+#include <tevent_internal.h>
/*
this is used to catch debug messages from events
diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c
index 345441b5e1..4193f916a0 100644
--- a/source4/lib/ldb/modules/operational.c
+++ b/source4/lib/ldb/modules/operational.c
@@ -268,16 +268,12 @@ static int operational_search(struct ldb_module *module, struct ldb_request *req
}
}
- /* use new set of attrs if any */
- if (search_attrs == NULL) {
- search_attrs = req->op.search.attrs;
- }
-
ret = ldb_build_search_req_ex(&down_req, module->ldb, ac,
req->op.search.base,
req->op.search.scope,
req->op.search.tree,
- (const char * const *)search_attrs,
+ /* use new set of attrs if any */
+ search_attrs?req->op.search.attrs:search_attrs,
req->controls,
ac, operational_callback,
req);
diff --git a/source4/lib/tls/tls.c b/source4/lib/tls/tls.c
index 24e4632a49..d16df25548 100644
--- a/source4/lib/tls/tls.c
+++ b/source4/lib/tls/tls.c
@@ -454,7 +454,7 @@ init_failed:
setup for a new connection
*/
struct socket_context *tls_init_server(struct tls_params *params,
- struct socket_context *socket,
+ struct socket_context *socket_ctx,
struct fd_event *fde,
const char *plain_chars)
{
@@ -463,9 +463,9 @@ struct socket_context *tls_init_server(struct tls_params *params,
struct socket_context *new_sock;
NTSTATUS nt_status;
- nt_status = socket_create_with_ops(socket, &tls_socket_ops, &new_sock,
+ nt_status = socket_create_with_ops(socket_ctx, &tls_socket_ops, &new_sock,
SOCKET_TYPE_STREAM,
- socket->flags | SOCKET_FLAG_ENCRYPT);
+ socket_ctx->flags | SOCKET_FLAG_ENCRYPT);
if (!NT_STATUS_IS_OK(nt_status)) {
return NULL;
}
@@ -475,13 +475,13 @@ struct socket_context *tls_init_server(struct tls_params *params,
return NULL;
}
- tls->socket = socket;
+ tls->socket = socket_ctx;
tls->fde = fde;
if (talloc_reference(tls, fde) == NULL) {
talloc_free(new_sock);
return NULL;
}
- if (talloc_reference(tls, socket) == NULL) {
+ if (talloc_reference(tls, socket_ctx) == NULL) {
talloc_free(new_sock);
return NULL;
}
@@ -534,7 +534,7 @@ failed:
/*
setup for a new client connection
*/
-struct socket_context *tls_init_client(struct socket_context *socket,
+struct socket_context *tls_init_client(struct socket_context *socket_ctx,
struct fd_event *fde,
const char *ca_path)
{
@@ -545,9 +545,9 @@ struct socket_context *tls_init_client(struct socket_context *socket,
struct socket_context *new_sock;
NTSTATUS nt_status;
- nt_status = socket_create_with_ops(socket, &tls_socket_ops, &new_sock,
+ nt_status = socket_create_with_ops(socket_ctx, &tls_socket_ops, &new_sock,
SOCKET_TYPE_STREAM,
- socket->flags | SOCKET_FLAG_ENCRYPT);
+ socket_ctx->flags | SOCKET_FLAG_ENCRYPT);
if (!NT_STATUS_IS_OK(nt_status)) {
return NULL;
}
@@ -555,12 +555,12 @@ struct socket_context *tls_init_client(struct socket_context *socket,
tls = talloc(new_sock, struct tls_context);
if (tls == NULL) return NULL;
- tls->socket = socket;
+ tls->socket = socket_ctx;
tls->fde = fde;
if (talloc_reference(tls, fde) == NULL) {
return NULL;
}
- if (talloc_reference(tls, socket) == NULL) {
+ if (talloc_reference(tls, socket_ctx) == NULL) {
return NULL;
}
new_sock->private_data = tls;
diff --git a/source4/libcli/security/security_descriptor.c b/source4/libcli/security/security_descriptor.c
index 2bce8e8b08..8e9c7eb4a9 100644
--- a/source4/libcli/security/security_descriptor.c
+++ b/source4/libcli/security/security_descriptor.c
@@ -53,7 +53,6 @@ static struct security_acl *security_acl_dup(TALLOC_CTX *mem_ctx,
const struct security_acl *oacl)
{
struct security_acl *nacl;
- int i;
nacl = talloc (mem_ctx, struct security_acl);
if (nacl == NULL) {
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 21670bbea5..a5bc5c1db4 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -71,7 +71,7 @@ struct brl_handle *brl_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *n
*/
NTSTATUS brl_lock(struct brl_context *brl,
struct brl_handle *brlh,
- uint16_t smbpid,
+ uint32_t smbpid,
uint64_t start, uint64_t size,
enum brl_type lock_type,
void *notify_ptr)
@@ -85,7 +85,7 @@ NTSTATUS brl_lock(struct brl_context *brl,
*/
NTSTATUS brl_unlock(struct brl_context *brl,
struct brl_handle *brlh,
- uint16_t smbpid,
+ uint32_t smbpid,
uint64_t start, uint64_t size)
{
return ops->brl_unlock(brl, brlh, smbpid, start, size);
diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index aff30d138e..75f142b6f6 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -28,20 +28,20 @@ struct brlock_ops {
struct brl_handle *(*brl_create_handle)(TALLOC_CTX *, struct ntvfs_handle *, DATA_BLOB *);
NTSTATUS (*brl_lock)(struct brl_context *,
struct brl_handle *,
- uint16_t ,
+ uint32_t ,
uint64_t , uint64_t ,
enum brl_type ,
void *);
NTSTATUS (*brl_unlock)(struct brl_context *,
struct brl_handle *,
- uint16_t ,
+ uint32_t ,
uint64_t , uint64_t );
NTSTATUS (*brl_remove_pending)(struct brl_context *,
struct brl_handle *,
void *);
NTSTATUS (*brl_locktest)(struct brl_context *,
struct brl_handle *,
- uint16_t ,
+ uint32_t ,
uint64_t , uint64_t ,
enum brl_type );
NTSTATUS (*brl_close)(struct brl_context *,
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index 4969f1a791..07a8b6d1d6 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -53,8 +53,6 @@
} while (0)
-#define NERR_Success 0
-#define NERR_badpass 86
#define NERR_notsupported 50
struct rap_string_heap {
diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c
index f08de72a38..43547c275b 100644
--- a/source4/ntvfs/posix/pvfs_resolve.c
+++ b/source4/ntvfs/posix/pvfs_resolve.c
@@ -190,16 +190,16 @@ static NTSTATUS parse_stream_name(struct smb_iconv_convenience *ic,
struct pvfs_filename *name,
const char *s)
{
- char *p;
+ char *p, *stream_name;
if (s[1] == '\0') {
return NT_STATUS_OBJECT_NAME_INVALID;
}
- name->stream_name = talloc_strdup(name, s+1);
+ name->stream_name = stream_name = talloc_strdup(name, s+1);
if (name->stream_name == NULL) {
return NT_STATUS_NO_MEMORY;
}
- p = name->stream_name;
+ p = stream_name;
while (*p) {
size_t c_size;
diff --git a/source4/torture/libnet/libnet_rpc.c b/source4/torture/libnet/libnet_rpc.c
index f25c1ecc48..0bcfcb6a4c 100644
--- a/source4/torture/libnet/libnet_rpc.c
+++ b/source4/torture/libnet/libnet_rpc.c
@@ -41,11 +41,11 @@ static bool test_connect_service(struct libnet_context *ctx,
bool badcreds, NTSTATUS expected_status)
{
NTSTATUS status;
- struct libnet_RpcConnect connect;
- connect.level = level;
- connect.in.binding = binding_string;
- connect.in.name = hostname;
- connect.in.dcerpc_iface = iface;
+ struct libnet_RpcConnect connect_r;
+ connect_r.level = level;
+ connect_r.in.binding = binding_string;
+ connect_r.in.name = hostname;
+ connect_r.in.dcerpc_iface = iface;
/* if bad credentials are needed, set baduser%badpassword instead
of default commandline-passed credentials */
@@ -54,12 +54,12 @@ static bool test_connect_service(struct libnet_context *ctx,
cli_credentials_set_password(ctx->cred, "badpassword", CRED_SPECIFIED);
}
- status = libnet_RpcConnect(ctx, ctx, &connect);
+ status = libnet_RpcConnect(ctx, ctx, &connect_r);
if (!NT_STATUS_EQUAL(status, expected_status)) {
d_printf("Connecting to rpc service %s on %s.\n\tFAILED. Expected: %s."
"Received: %s\n",
- connect.in.dcerpc_iface->name, connect.in.binding, nt_errstr(expected_status),
+ connect_r.in.dcerpc_iface->name, connect_r.in.binding, nt_errstr(expected_status),
nt_errstr(status));
return false;
@@ -68,15 +68,15 @@ static bool test_connect_service(struct libnet_context *ctx,
d_printf("PASSED. Expected: %s, received: %s\n", nt_errstr(expected_status),
nt_errstr(status));
- if (connect.level == LIBNET_RPC_CONNECT_DC_INFO && NT_STATUS_IS_OK(status)) {
+ if (connect_r.level == LIBNET_RPC_CONNECT_DC_INFO && NT_STATUS_IS_OK(status)) {
d_printf("Domain Controller Info:\n");
- d_printf("\tDomain Name:\t %s\n", connect.out.domain_name);
- d_printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect.out.domain_sid));
- d_printf("\tRealm:\t\t %s\n", connect.out.realm);
- d_printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect.out.guid));
+ d_printf("\tDomain Name:\t %s\n", connect_r.out.domain_name);
+ d_printf("\tDomain SID:\t %s\n", dom_sid_string(ctx, connect_r.out.domain_sid));
+ d_printf("\tRealm:\t\t %s\n", connect_r.out.realm);
+ d_printf("\tGUID:\t\t %s\n", GUID_string(ctx, connect_r.out.guid));
} else if (!NT_STATUS_IS_OK(status)) {
- d_printf("Error string: %s\n", connect.out.error_string);
+ d_printf("Error string: %s\n", connect_r.out.error_string);
}
return true;
diff --git a/source4/torture/raw/lookuprate.c b/source4/torture/raw/lookuprate.c
index f7ba004ae5..e4caf7b1be 100644
--- a/source4/torture/raw/lookuprate.c
+++ b/source4/torture/raw/lookuprate.c
@@ -237,7 +237,7 @@ bool torture_bench_lookup(struct torture_context *torture)
NTSTATUS status;
bool result = false;
- int i, tries;
+ int i;
struct smbcli_state *cli = NULL;
if (!torture_open_connection(&cli, torture, 0)) {
diff --git a/source4/torture/raw/tconrate.c b/source4/torture/raw/tconrate.c
index 0109b65481..076e5be31f 100644
--- a/source4/torture/raw/tconrate.c
+++ b/source4/torture/raw/tconrate.c
@@ -29,7 +29,6 @@
#define TIME_LIMIT_SECS 30
#define usec_to_sec(s) ((s) / 1000000)
-#define sec_to_usec(s) ((s) * 1000000)
/* Map a shared memory buffer of at least nelem counters. */
static void * map_count_buffer(unsigned nelem, size_t elemsz)
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index c7518d15a0..785b43d7a1 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -148,7 +148,6 @@ bool test_SetupCredentials2(struct dcerpc_pipe *p, struct torture_context *tctx,
struct creds_CredentialState *creds;
const struct samr_Password *mach_password;
const char *machine_name;
- const char *plain_pass;
mach_password = cli_credentials_get_nt_hash(machine_credentials, tctx);
machine_name = cli_credentials_get_workstation(machine_credentials);
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 2912628744..821cac341e 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -1087,7 +1087,7 @@ static bool test_SetUserPass_level_ex(struct dcerpc_pipe *p,
}
if (fields_present & SAMR_FIELD_COMMENT) {
- comment = talloc_asprintf(tctx, "comment: %d\n", time(NULL));
+ comment = talloc_asprintf(tctx, "comment: %ld\n", time(NULL));
}
ZERO_STRUCT(u);
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 451990a71b..bc3cbeac3b 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -129,7 +129,7 @@ static bool test_samr_ops(struct torture_context *tctx,
NTSTATUS status;
struct samr_GetDomPwInfo r;
struct samr_PwInfo info;
- struct samr_Connect connect;
+ struct samr_Connect connect_r;
struct samr_OpenDomain opendom;
int i;
struct lsa_String name;
@@ -140,13 +140,13 @@ static bool test_samr_ops(struct torture_context *tctx,
r.in.domain_name = &name;
r.out.info = &info;
- connect.in.system_name = 0;
- connect.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
- connect.out.connect_handle = &handle;
+ connect_r.in.system_name = 0;
+ connect_r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ connect_r.out.connect_handle = &handle;
printf("Testing Connect and OpenDomain on BUILTIN\n");
- status = dcerpc_samr_Connect(p, tctx, &connect);
+ status = dcerpc_samr_Connect(p, tctx, &connect_r);
if (!NT_STATUS_IS_OK(status)) {
if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
printf("Connect failed (expected, schannel mapped to anonymous): %s\n",
diff --git a/source4/utils/ad2oLschema.c b/source4/utils/ad2oLschema.c
index 2e3139d9c7..29fda09f3c 100644
--- a/source4/utils/ad2oLschema.c
+++ b/source4/utils/ad2oLschema.c
@@ -304,8 +304,8 @@ static struct schema_conv process_convert(struct ldb_context *ldb, enum dsdb_sch
const char *oid = objectclass->governsID_oid;
const char *subClassOf = objectclass->subClassOf;
int objectClassCategory = objectclass->objectClassCategory;
- char **must;
- char **may;
+ const char **must;
+ const char **may;
char *schema_entry = NULL;
const char *objectclass_name_as_list[] = {
objectclass->lDAPDisplayName,
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index dcbb3c7fb6..9b660ff362 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -194,7 +194,6 @@ static PyObject *py_input_read(PyObject *_self, PyObject *args, PyObject *kwargs
static PyObject *py_input_readline(PyObject *_self)
{
- input_Stream_Object *self = (input_Stream_Object *)_self;
/* FIXME */
PyErr_SetString(PyExc_NotImplementedError,
"readline() not yet implemented");
@@ -204,9 +203,7 @@ static PyObject *py_input_readline(PyObject *_self)
static PyObject *py_input_readlines(PyObject *_self, PyObject *args, PyObject *kwargs)
{
const char *kwnames[] = { "hint", NULL };
- PyObject *ret;
int hint;
- input_Stream_Object *self = (input_Stream_Object *)_self;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i", discard_const_p(char *, kwnames), &hint))
return NULL;
@@ -219,7 +216,6 @@ static PyObject *py_input_readlines(PyObject *_self, PyObject *args, PyObject *k
static PyObject *py_input___iter__(PyObject *_self)
{
- input_Stream_Object *self = (input_Stream_Object *)_self;
/* FIXME */
PyErr_SetString(PyExc_NotImplementedError,
"__iter__() not yet implemented");
diff --git a/source4/winbind/wb_init_domain.c b/source4/winbind/wb_init_domain.c
index 8011cba19c..5953474c52 100644
--- a/source4/winbind/wb_init_domain.c
+++ b/source4/winbind/wb_init_domain.c
@@ -388,7 +388,6 @@ static void init_domain_recv_queryinfo(struct rpc_request *req)
* open an LDAP connection */
static void init_domain_recv_samr(struct composite_context *ctx)
{
- const char *ldap_url;
struct init_domain_state *state =
talloc_get_type(ctx->async.private_data,
struct init_domain_state);