From f8a17bd8bdbb52b200671e7ed52ffd982419f3f6 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Sep 2006 19:47:48 +0000 Subject: r18047: More C++ stuff (This used to be commit 86f4ca84f2df2aa8977eb24828e3aa840dda7201) --- source3/client/clitar.c | 6 +++--- source3/libads/kerberos_verify.c | 4 ++-- source3/libads/sasl.c | 6 +++--- source3/libsmb/smbdes.c | 6 +++--- source3/nsswitch/winbindd_async.c | 11 +++++++---- source3/printing/print_iprint.c | 5 +++-- source3/rpc_parse/parse_dfs.c | 2 +- source3/utils/net_lookup.c | 6 +++--- 8 files changed, 25 insertions(+), 21 deletions(-) (limited to 'source3') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index d8cf43e652..f228db1199 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1075,7 +1075,7 @@ static char *get_longfilename(file_info2 finfo) /* finfo.size here is the length of the filename as written by the "/./@LongLink" name * header call. */ int namesize = finfo.size + strlen(cur_dir) + 2; - char *longname = SMB_MALLOC(namesize); + char *longname = (char *)SMB_MALLOC(namesize); int offset = 0, left = finfo.size; BOOL first = True; @@ -1523,7 +1523,7 @@ static int read_inclusion_file(char *filename) while ((! error) && (x_fgets(buf, sizeof(buf)-1, inclusion))) { if (inclusion_buffer == NULL) { inclusion_buffer_size = 1024; - if ((inclusion_buffer = SMB_MALLOC(inclusion_buffer_size)) == NULL) { + if ((inclusion_buffer = (char *)SMB_MALLOC(inclusion_buffer_size)) == NULL) { DEBUG(0,("failure allocating buffer to read inclusion file\n")); error = 1; break; @@ -1536,7 +1536,7 @@ static int read_inclusion_file(char *filename) if ((strlen(buf) + 1 + inclusion_buffer_sofar) >= inclusion_buffer_size) { inclusion_buffer_size *= 2; - inclusion_buffer = SMB_REALLOC(inclusion_buffer,inclusion_buffer_size); + inclusion_buffer = (char *)SMB_REALLOC(inclusion_buffer,inclusion_buffer_size); if (!inclusion_buffer) { DEBUG(0,("failure enlarging inclusion buffer to %d bytes\n", inclusion_buffer_size)); diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c index 3aa0860809..dc2f2a1e78 100644 --- a/source3/libads/kerberos_verify.c +++ b/source3/libads/kerberos_verify.c @@ -101,7 +101,7 @@ static BOOL ads_keytab_verify_ticket(krb5_context context, krb5_auth_context aut if (strequal(entry_princ_s, valid_princ_formats[i])) { number_matched_principals++; p_packet->length = ticket->length; - p_packet->data = (krb5_pointer)ticket->data; + p_packet->data = (char *)ticket->data; *pp_tkt = NULL; ret = krb5_rd_req_return_keyblock_from_keytab(context, &auth_context, p_packet, @@ -228,7 +228,7 @@ static BOOL ads_secrets_verify_ticket(krb5_context context, krb5_auth_context au /* CIFS doesn't use addresses in tickets. This would break NAT. JRA */ p_packet->length = ticket->length; - p_packet->data = (krb5_pointer)ticket->data; + p_packet->data = (char *)ticket->data; /* We need to setup a auth context with each possible encoding type in turn. */ for (i=0;enctypes[i];i++) { diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index fe31ef94bb..c3f496938a 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -348,7 +348,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) goto failed; } - cred.bv_val = output_token.value; + cred.bv_val = (char *)output_token.value; cred.bv_len = output_token.length; rc = ldap_sasl_bind_s(ads->ld, NULL, "GSSAPI", &cred, NULL, NULL, @@ -397,7 +397,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) gss_release_buffer(&minor_status, &output_token); output_token.value = SMB_MALLOC(strlen(ads->config.bind_path) + 8); - p = output_token.value; + p = (uint8 *)output_token.value; *p++ = 1; /* no sign & seal selection */ /* choose the same size as the server gave us */ @@ -419,7 +419,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) free(output_token.value); - cred.bv_val = input_token.value; + cred.bv_val = (char *)input_token.value; cred.bv_len = input_token.length; rc = ldap_sasl_bind_s(ads->ld, NULL, "GSSAPI", &cred, NULL, NULL, diff --git a/source3/libsmb/smbdes.c b/source3/libsmb/smbdes.c index ee43f4beee..8168eee207 100644 --- a/source3/libsmb/smbdes.c +++ b/source3/libsmb/smbdes.c @@ -172,7 +172,7 @@ static void concat(char *out, char *in1, char *in2, int l1, int l2) *out++ = *in2++; } -static void xor(char *out, char *in1, char *in2, int n) +static void x_or(char *out, char *in1, char *in2, int n) { int i; for (i=0;irequest.data.dual_idmapset.gid; - result = idmap_set_mapping(&sid, id, - state->request.data.dual_idmapset.type); + result = idmap_set_mapping( + &sid, id, + (enum idmap_type)state->request.data.dual_idmapset.type); return NT_STATUS_IS_OK(result) ? WINBINDD_OK : WINBINDD_ERROR; } @@ -1559,7 +1560,8 @@ void winbindd_uid2sid_async(TALLOC_CTX *mem_ctx, uid_t uid, ZERO_STRUCT(request); request.cmd = WINBINDD_DUAL_UID2SID; request.data.uid = uid; - do_async(mem_ctx, idmap_child(), &request, winbindd_uid2sid_recv, cont, private_data); + do_async(mem_ctx, idmap_child(), &request, winbindd_uid2sid_recv, + (void *)cont, private_data); } enum winbindd_result winbindd_dual_uid2sid(struct winbindd_domain *domain, @@ -1615,7 +1617,8 @@ void winbindd_gid2sid_async(TALLOC_CTX *mem_ctx, gid_t gid, ZERO_STRUCT(request); request.cmd = WINBINDD_DUAL_GID2SID; request.data.gid = gid; - do_async(mem_ctx, idmap_child(), &request, winbindd_gid2sid_recv, cont, private_data); + do_async(mem_ctx, idmap_child(), &request, winbindd_gid2sid_recv, + (void *)cont, private_data); } enum winbindd_result winbindd_dual_gid2sid(struct winbindd_domain *domain, diff --git a/source3/printing/print_iprint.c b/source3/printing/print_iprint.c index 04b096a8a5..3eb231c2eb 100644 --- a/source3/printing/print_iprint.c +++ b/source3/printing/print_iprint.c @@ -92,7 +92,7 @@ static int iprint_get_server_version(http_t *http, char* serviceUri) request = ippNew(); - request->request.op.operation_id = OPERATION_NOVELL_MGMT; + request->request.op.operation_id = (ipp_op_t)OPERATION_NOVELL_MGMT; request->request.op.request_id = 1; language = cupsLangDefault(); @@ -343,7 +343,8 @@ BOOL iprint_cache_reload(void) request = ippNew(); - request->request.op.operation_id = OPERATION_NOVELL_LIST_PRINTERS; + request->request.op.operation_id = + (ipp_op_t)OPERATION_NOVELL_LIST_PRINTERS; request->request.op.request_id = 1; language = cupsLangDefault(); diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c index 6d439632ba..f246e2f254 100644 --- a/source3/rpc_parse/parse_dfs.c +++ b/source3/rpc_parse/parse_dfs.c @@ -2576,7 +2576,7 @@ BOOL init_netdfs_q_dfs_EnumEx(NETDFS_Q_DFS_ENUMEX *v, uint32 level, uint32 bufsi if (!dfs_name) return False; - init_unistr2(&v->dfs_name, dfs_name, UNI_FLAGS_NONE|UNI_STR_TERMINATE); + init_unistr2(&v->dfs_name, dfs_name, UNI_STR_TERMINATE); v->level = level; diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c index 8e1450cfa0..ebc7ba98b0 100644 --- a/source3/utils/net_lookup.c +++ b/source3/utils/net_lookup.c @@ -211,10 +211,10 @@ static int net_lookup_kdc(int argc, const char **argv) } if (argc>0) { - realm.data = CONST_DISCARD(krb5_pointer, argv[0]); + realm.data = CONST_DISCARD(char *, argv[0]); realm.length = strlen(argv[0]); } else if (lp_realm() && *lp_realm()) { - realm.data = (krb5_pointer) lp_realm(); + realm.data = lp_realm(); realm.length = strlen(realm.data); } else { rc = krb5_get_host_realm(ctx, NULL, &realms); @@ -223,7 +223,7 @@ static int net_lookup_kdc(int argc, const char **argv) error_message(rc))); return -1; } - realm.data = (krb5_pointer) *realms; + realm.data = (char *) *realms; realm.length = strlen(realm.data); } -- cgit