diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-06 14:39:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:15 -0500 |
commit | fd1cf23567566b65cdeecdbc04f58f29e29edd79 (patch) | |
tree | c37c3650eadf0ba8e39d25ffe8d59a43b8b74257 /source3/lib/ldb/common/ldb_ldif.c | |
parent | d898cbce90673d1f13d2fd0b2c8308af34e2fb9c (diff) | |
download | samba-fd1cf23567566b65cdeecdbc04f58f29e29edd79.tar.gz samba-fd1cf23567566b65cdeecdbc04f58f29e29edd79.tar.bz2 samba-fd1cf23567566b65cdeecdbc04f58f29e29edd79.zip |
r19132: Fix some C++ warnings. Is there interest to have them in Samba4 as well?
I have some problems resolving the last 3 ones in attrib_handlers.c. In line
251 the function ldb_dn_explode_casefold is called with mem_ctx as the first
argument. Looking at ldb_dn_explode_casefold I see that the first argument it
expects is a struct ldb_context. I could certainly add a cast to (struct
ldb_context *) to that call, but I would assume that this is the wrong fix. Is
it possible that attrib_handlers.c:251 and :254 should have ldb and not
mem_ctx as the first argument?
Can anybody from Samba4 clarify this for me and apply the correct fix?
Thanks a lot.
Volker
(This used to be commit 26f2cb71ebf00b2c6f356da5f32384f7fa083521)
Diffstat (limited to 'source3/lib/ldb/common/ldb_ldif.c')
-rw-r--r-- | source3/lib/ldb/common/ldb_ldif.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/lib/ldb/common/ldb_ldif.c b/source3/lib/ldb/common/ldb_ldif.c index c5084aaa6c..0c31f25cc7 100644 --- a/source3/lib/ldb/common/ldb_ldif.c +++ b/source3/lib/ldb/common/ldb_ldif.c @@ -72,7 +72,7 @@ static int ldb_read_data_file(void *mem_ctx, struct ldb_val *value) goto done; } - value->data = talloc_size(mem_ctx, statbuf.st_size + 1); + value->data = (uint8_t *)talloc_size(mem_ctx, statbuf.st_size + 1); if (value->data == NULL) { ret = -1; goto done; @@ -680,7 +680,8 @@ struct ldif_read_file_state { static int fgetc_file(void *private_data) { - struct ldif_read_file_state *state = private_data; + struct ldif_read_file_state *state = + (struct ldif_read_file_state *)private_data; return fgetc(state->f); } @@ -701,7 +702,8 @@ struct ldif_read_string_state { static int fgetc_string(void *private_data) { - struct ldif_read_string_state *state = private_data; + struct ldif_read_string_state *state = + (struct ldif_read_string_state *)private_data; if (state->s[0] != 0) { return *state->s++; } @@ -730,7 +732,8 @@ static int fprintf_file(void *private_data, const char *fmt, ...) PRINTF_ATTRIBU static int fprintf_file(void *private_data, const char *fmt, ...) { - struct ldif_write_file_state *state = private_data; + struct ldif_write_file_state *state = + (struct ldif_write_file_state *)private_data; int ret; va_list ap; |