svn commit: samba r3971 - in branches/SAMBA_4_0/source: client libcli/auth libcli/raw ntvfs/print passdb smb_server torture/basic

Andrew Bartlett abartlet at samba.org
Thu Nov 25 21:50:46 GMT 2004


On Thu, 2004-11-25 at 20:01 +0000, metze at samba.org wrote:
> Author: metze
> Date: 2004-11-25 20:01:47 +0000 (Thu, 25 Nov 2004)
> New Revision: 3971
> 
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3971
> 
> Log:
> fix compiler warnings

I realise everybody is keen on cleaning up warnings, but watch out with
some of these changes:

> Modified: branches/SAMBA_4_0/source/libcli/auth/ntlmssp_parse.c
> ===================================================================
> --- branches/SAMBA_4_0/source/libcli/auth/ntlmssp_parse.c	2004-11-25 19:59:08 UTC (rev 3970)
> +++ branches/SAMBA_4_0/source/libcli/auth/ntlmssp_parse.c	2004-11-25 20:01:47 UTC (rev 3971)
> @@ -115,7 +115,7 @@
>  			break;
>  		case 'C':
>  			s = va_arg(ap, char *);
> -			pointers[i].data = s;
> +			pointers[i].data = (void *)s;
>  			pointers[i].length = strlen(s)+1;
>  			head_size += pointers[i].length;
>  			break;

a cast to void doesn't quite seem right here.  DATA_BLOB.data is
uint8_t, so shouldn't this be a uint8_t cast?  

> @@ -85,7 +85,7 @@
>  static NTSTATUS try_trans2_len(struct smbcli_state *cli, 
>  			     const char *format,
>  			     int op, int level,
> -			     char *param, char *data,
> +			     uint8_t *param, uint8_t *data,
>  			     int param_len, int *data_len,
>  			     int *rparam_len, int *rdata_len)
>  {
> @@ -123,7 +123,7 @@
>  	int data_len = 0;
>  	int param_len = 0;
>  	int rparam_len, rdata_len;
> -	pstring param, data;
> +	uint8_t param[1024], data[1024];
>  	NTSTATUS status1, status2;
>  
>  	memset(data, 0, sizeof(data));
> @@ -158,7 +158,7 @@
>  	int data_len = 0;
>  	int param_len = 0;
>  	int rparam_len, rdata_len;
> -	pstring param, data;
> +	uint8_t param[1024], data[1024];
>  	NTSTATUS status;
>  
>  	memset(data, 0, sizeof(data));

I'm worried these changes are just going to make it harder to find and
eliminate pstrings from the source. 

> @@ -324,7 +324,7 @@
>  ****************************************************************************/
>  static NTSTATUS try_nttrans(struct smbcli_state *cli, 
>  			    int op,
> -			    char *param, char *data,
> +			    uint8_t *param, uint8_t *data,
>  			    int param_len, int data_len,
>  			    int *rparam_len, int *rdata_len)
>  {
> @@ -367,7 +367,7 @@
>  static NTSTATUS try_nttrans_len(struct smbcli_state *cli, 
>  			     const char *format,
>  			     int op, int level,
> -			     char *param, char *data,
> +			     uint8_t *param, uint8_t *data,
>  			     int param_len, int *data_len,
>  			     int *rparam_len, int *rdata_len)
>  {
> @@ -405,7 +405,7 @@
>  	int data_len = 0;
>  	int param_len = 0;
>  	int rparam_len, rdata_len;
> -	pstring param, data;
> +	uint8_t param[1024], data[1024];
>  	NTSTATUS status;
>  
>  	memset(data, 0, sizeof(data));

Likewise here.

Andrew Bartlett

-- 
Andrew Bartlett <abartlet at samba.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20041126/cfebfb0c/attachment.bin


More information about the samba-technical mailing list