[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Wed Sep 22 13:57:09 MDT 2010


The branch, master has been updated
       via  fe4576d s3-registry: fix some c++ build warnings.
      from  314dc23 Fix bug #7693 - smbd changing mode of files on rename

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fe4576dff0dd949d87a099afc6b66e4763537fdd
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 22 12:40:42 2010 -0700

    s3-registry: fix some c++ build warnings.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/cbuf.c                    |    4 ++--
 source3/registry/reg_format.c         |    4 ++--
 source3/registry/reg_parse_internal.c |    2 +-
 source3/utils/net_rpc_registry.c      |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/cbuf.c b/source3/lib/cbuf.c
index 85d1c14..62a705c 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 946380d..f2b0846 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 995bc96..64c4e06 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 dbc3d5d..e10ba00 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));


-- 
Samba Shared Repository


More information about the samba-cvs mailing list