Bug 3004 - utils/ntlm_auth_diagnostics.c: "unsigned char *" incompatible with "const char *"
Summary: utils/ntlm_auth_diagnostics.c: "unsigned char *" incompatible with "const cha...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.20
Hardware: SGI IRIX
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 08:14 UTC by Jason Mader (mail bounces back)
Modified: 2006-06-27 09:54 UTC (History)
0 users

See Also:


Attachments
Two fixes for ntlm_auth_diagnostics.c (880 bytes, patch)
2005-08-15 08:21 UTC, Jason Mader (mail bounces back)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader (mail bounces back) 2005-08-15 08:14:32 UTC
cc-1164 cc: WARNING File = utils/ntlm_auth_diagnostics.c, Line = 479
  Argument of type "unsigned char *" is incompatible with parameter of type
          "const char *".

        lm_response.length = strlen(lm_response.data);
                                    ^
Comment 1 Jason Mader (mail bounces back) 2005-08-15 08:15:23 UTC
if ((convert_string_allocate(NULL, CH_UNIX,
                                     CH_DOS, password,
                                     strlen(password)+1,
                                     (void**)&lm_response.data,True)) == -1) {
                DEBUG(0, ("push_ascii_allocate failed!\n"));
                exit(1);
        }


Since the length of lm_response.data is the return value of this function, the strlen() call may be 
unnecessary.
Comment 2 Jason Mader (mail bounces back) 2005-08-15 08:18:04 UTC
Also, I just realized the DEBUG message describes the wrong function that could fail.
Comment 3 Jason Mader (mail bounces back) 2005-08-15 08:21:07 UTC
Created attachment 1376 [details]
Two fixes for ntlm_auth_diagnostics.c
Comment 4 Jason Mader (mail bounces back) 2006-06-14 06:16:20 UTC
Compiler warning is not in 3.0.23rc2

However, the statement
  DEBUG(0, ("push_ascii_allocate failed!\n"));
still describes the wrong call that failed.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2006-06-14 06:34:28 UTC
Fix DEBUG statement.  Thanks.
Comment 6 Jason Mader (mail bounces back) 2006-06-27 09:54:30 UTC
Warnings do not exist in 3.0.23rc3