From fe4576dff0dd949d87a099afc6b66e4763537fdd Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 22 Sep 2010 12:40:42 -0700 Subject: s3-registry: fix some c++ build warnings. Guenther --- source3/registry/reg_format.c | 4 ++-- source3/registry/reg_parse_internal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/registry') 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; -- cgit