r17626: Some C++ Warnings
authorVolker Lendecke <vlendec@samba.org>
Sun, 20 Aug 2006 17:55:06 +0000 (17:55 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:44 +0000 (11:38 -0500)
source/auth/auth_ntlmssp.c
source/auth/auth_winbind.c
source/libads/ads_struct.c
source/libads/krb5_setpw.c
source/nmbd/nmbd_winsserver.c

index 6cf987a48b1730d718446ff4ce0ab375890652c0..51b145a7608b3822bfe23e24a45f024e6adfb0f2 100644 (file)
@@ -30,7 +30,8 @@
 
 static const uint8 *auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlmssp_state)
 {
-       AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context;
+       AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
+               (AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
        return auth_ntlmssp_state->auth_context->get_ntlm_challenge(auth_ntlmssp_state->auth_context);
 }
 
@@ -41,7 +42,8 @@ static const uint8 *auth_ntlmssp_get_challenge(const struct ntlmssp_state *ntlms
  */
 static BOOL auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_state)
 {
-       AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context;
+       AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
+               (AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
        struct auth_context *auth_context = auth_ntlmssp_state->auth_context;
 
        return auth_context->challenge_may_be_modified;
@@ -53,7 +55,8 @@ static BOOL auth_ntlmssp_may_set_challenge(const struct ntlmssp_state *ntlmssp_s
  */
 static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *challenge)
 {
-       AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context;
+       AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
+               (AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
        struct auth_context *auth_context = auth_ntlmssp_state->auth_context;
 
        SMB_ASSERT(challenge->length == 8);
@@ -77,7 +80,8 @@ static NTSTATUS auth_ntlmssp_set_challenge(struct ntlmssp_state *ntlmssp_state,
 
 static NTSTATUS auth_ntlmssp_check_password(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *user_session_key, DATA_BLOB *lm_session_key) 
 {
-       AUTH_NTLMSSP_STATE *auth_ntlmssp_state = ntlmssp_state->auth_context;
+       AUTH_NTLMSSP_STATE *auth_ntlmssp_state =
+               (AUTH_NTLMSSP_STATE *)ntlmssp_state->auth_context;
        auth_usersupplied_info *user_info = NULL;
        NTSTATUS nt_status;
        BOOL username_was_mapped;
index d8ac348d04081d565bf4c707a41edf8e7d3516cd..835e0b4b25564ab704726bb62253074073ef1fa6 100644 (file)
@@ -32,7 +32,7 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response
        size_t len = response->length - sizeof(struct winbindd_response);
        prs_struct ps;
        if (len > 0) {
-               info3_ndr = response->extra_data.data;
+               info3_ndr = (uint8 *)response->extra_data.data;
                if (!prs_init(&ps, len, mem_ctx, UNMARSHALL)) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -112,7 +112,8 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
        unbecome_root();
 
        if ( result == NSS_STATUS_UNAVAIL )  {
-               struct auth_methods *auth_method = my_private_data;
+               struct auth_methods *auth_method =
+                       (struct auth_methods *)my_private_data;
 
                if ( auth_method )
                        return auth_method->auth(auth_context, auth_method->private_data, 
index 7a03a2a80f6b2db97deb9add3a2903666f3b8f96..372f72fe06705ba544f9fa0c8b824b3c7936a539 100644 (file)
@@ -42,7 +42,7 @@ char *ads_build_path(const char *realm, const char *sep, const char *field, int
 
        len = (numbits+1)*(strlen(field)+1) + strlen(r) + 1;
 
-       ret = SMB_MALLOC(len);
+       ret = (char *)SMB_MALLOC(len);
        if (!ret)
                return NULL;
 
index 07e6320c266e5d0c555850d1550f6dc3559c165c..c7a4b982db43459af888d3a283a7e245b7c6e78a 100644 (file)
@@ -667,7 +667,9 @@ kerb_prompter(krb5_context ctx, void *data,
        memset(prompts[0].reply->data, 0, prompts[0].reply->length);
        if (prompts[0].reply->length > 0) {
                if (data) {
-                       strncpy(prompts[0].reply->data, data, prompts[0].reply->length-1);
+                       strncpy(prompts[0].reply->data,
+                               (const char *)data,
+                               prompts[0].reply->length-1);
                        prompts[0].reply->length = strlen(prompts[0].reply->data);
                } else {
                        prompts[0].reply->length = 0;
index 75841414bc4ec88f2a18486bef02e6b8bb3260a4..320415503b3ad83723fdd745c876f42a3c9bf19c 100644 (file)
@@ -159,7 +159,7 @@ static TDB_DATA name_record_to_wins_record(const struct name_record *namerec)
        len = (2 + 1 + (7*4)); /* "wbddddddd" */
        len += (namerec->data.num_ips * 4);
 
-       data.dptr = SMB_MALLOC(len);
+       data.dptr = (char *)SMB_MALLOC(len);
        if (!data.dptr) {
                return data;
        }