summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/cbuf.c4
-rw-r--r--source3/registry/reg_format.c4
-rw-r--r--source3/registry/reg_parse_internal.c2
-rw-r--r--source3/utils/net_rpc_registry.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/cbuf.c b/source3/lib/cbuf.c
index 85d1c14d45..62a705c695 100644
--- a/source3/lib/cbuf.c
+++ b/source3/lib/cbuf.c
@@ -51,7 +51,7 @@ cbuf* cbuf_new(const void* ctx)
if (s == NULL)
return NULL;
s->size = 32;
- s->buf = talloc_size(s, s->size);
+ s->buf = (char *)talloc_size(s, s->size);
if (s->size && (s->buf == NULL)) {
talloc_free(s);
return NULL;
@@ -66,7 +66,7 @@ cbuf* cbuf_copy(const cbuf* b)
return NULL;
}
- s->buf = talloc_memdup(s, b->buf, b->size); /* only up to pos? */
+ s->buf = (char *)talloc_memdup(s, b->buf, b->size); /* only up to pos? */
/* XXX shallow did not work, because realloc */
/* fails with multiple references */
diff --git a/source3/registry/reg_format.c b/source3/registry/reg_format.c
index 946380d676..f2b0846b11 100644
--- a/source3/registry/reg_format.c
+++ b/source3/registry/reg_format.c
@@ -276,7 +276,7 @@ static int reg_format_value_hex(struct reg_format* f, const char* name, uint32_t
cpl += n;
- for (ptr=data; len>1; len--,ptr++) {
+ for (ptr=(const unsigned char *)data; len>1; len--,ptr++) {
n = cbuf_printf(line, "%02x,", (unsigned)(*ptr));
if (n < 0) {
return n;
@@ -641,7 +641,7 @@ struct reg_format_file_opt {
const char* sep;
};
-struct reg_format_file_opt reg_format_file_opt(void* mem_ctx, const char* opt)
+static struct reg_format_file_opt reg_format_file_opt(void* mem_ctx, const char* opt)
{
static const struct reg_format_file_opt REG4 = {
.head = "REGEDIT4",
diff --git a/source3/registry/reg_parse_internal.c b/source3/registry/reg_parse_internal.c
index 995bc96275..64c4e06622 100644
--- a/source3/registry/reg_parse_internal.c
+++ b/source3/registry/reg_parse_internal.c
@@ -44,7 +44,7 @@ size_t iconvert_talloc(const void* ctx,
if (dst == NULL) {
/* dstlen = 2*srclen + 2; */
dstlen = srclen;
- dst = talloc_size(ctx, dstlen);
+ dst = (char *)talloc_size(ctx, dstlen);
if (dst == NULL) {
DEBUG(0,("iconver_talloc no mem\n"));
return -1;
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index dbc3d5dfa2..e10ba008df 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -1723,7 +1723,7 @@ static WERROR import_create_val(struct import_ctx* ctx,
status = rpccli_winreg_SetValue(ctx->pipe_hnd, mem_ctx, parent,
valuename, type,
- discard_const(val), len, &werr);
+ (uint8_t *)discard_const(val), len, &werr);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, _("registry_setvalue failed: %s\n"),
nt_errstr(status));