Bug 3004 - utils/ntlm_auth_diagnostics.c: "unsigned char *" incompatible with "const char *"
utils/ntlm_auth_diagnostics.c: "unsigned char *" incompatible with "const cha...
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.20
SGI IRIX
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-15 08:14 UTC by Jason Mader
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
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader 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 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 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 2005-08-15 08:21:07 UTC
Created attachment 1376 [details]
Two fixes for ntlm_auth_diagnostics.c
Comment 4 Jason Mader 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 2006-06-14 06:34:28 UTC
Fix DEBUG statement.  Thanks.
Comment 6 Jason Mader 2006-06-27 09:54:30 UTC
Warnings do not exist in 3.0.23rc3