svn commit: samba r8607 - branches/SAMBA_3_0/source/registry
trunk/source/registry
jerry at samba.org
jerry at samba.org
Tue Jul 19 16:22:43 GMT 2005
Author: jerry
Date: 2005-07-19 16:22:42 +0000 (Tue, 19 Jul 2005)
New Revision: 8607
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8607
Log:
BUG 2900 more compiler warnings
Modified:
branches/SAMBA_3_0/source/registry/regfio.c
trunk/source/registry/regfio.c
Changeset:
Modified: branches/SAMBA_3_0/source/registry/regfio.c
===================================================================
--- branches/SAMBA_3_0/source/registry/regfio.c 2005-07-19 14:51:20 UTC (rev 8606)
+++ branches/SAMBA_3_0/source/registry/regfio.c 2005-07-19 16:22:42 UTC (rev 8607)
@@ -199,7 +199,7 @@
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, file->header, sizeof( file->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)file->header, sizeof( file->header )) )
return False;
/* yes, these values are always identical so store them only once */
@@ -261,7 +261,7 @@
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, hbin->header, sizeof( hbin->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)hbin->header, sizeof( hbin->header )) )
return False;
if ( !prs_uint32( "first_hbin_off", ps, depth, &hbin->first_hbin_off ))
@@ -310,7 +310,7 @@
if ( !prs_uint32( "rec_size", ps, depth, &nk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, nk->header, sizeof( nk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)nk->header, sizeof( nk->header )) )
return False;
if ( !prs_uint16( "key_type", ps, depth, &nk->key_type ))
@@ -371,7 +371,7 @@
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, nk->keyname, name_length) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8*)nk->keyname, name_length) )
return False;
if ( UNMARSHALLING(ps) )
@@ -635,7 +635,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &lf->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", &hbin->ps, depth, lf->header, sizeof( lf->header )) )
+ if ( !prs_uint8s( True, "header", &hbin->ps, depth, (uint8*)lf->header, sizeof( lf->header )) )
return False;
if ( !prs_uint16( "num_keys", &hbin->ps, depth, &lf->num_keys))
@@ -689,7 +689,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &sk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, sk->header, sizeof( sk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)sk->header, sizeof( sk->header )) )
return False;
if ( !prs_uint16( "tag", ps, depth, &tag))
return False;
@@ -741,7 +741,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &vk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, vk->header, sizeof( vk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)vk->header, sizeof( vk->header )) )
return False;
if ( MARSHALLING(&hbin->ps) )
@@ -770,7 +770,7 @@
if ( !(vk->valuename = PRS_ALLOC_MEM( ps, char, name_length+1 )))
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, vk->valuename, name_length ) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8*)vk->valuename, name_length ) )
return False;
}
@@ -1020,7 +1020,7 @@
static BOOL next_record( REGF_HBIN *hbin, const char *hdr, BOOL *eob )
{
- char header[REC_HDR_SIZE] = "";
+ uint8 header[REC_HDR_SIZE];
uint32 record_size;
uint32 curr_off, block_size;
BOOL found = False;
@@ -1037,6 +1037,7 @@
block_size = prs_data_size( ps );
record_size = 0;
+ memset( header, 0x0, sizeof(uint8)*REC_HDR_SIZE );
while ( !found ) {
curr_off = curr_off+record_size;
Modified: trunk/source/registry/regfio.c
===================================================================
--- trunk/source/registry/regfio.c 2005-07-19 14:51:20 UTC (rev 8606)
+++ trunk/source/registry/regfio.c 2005-07-19 16:22:42 UTC (rev 8607)
@@ -199,7 +199,7 @@
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, file->header, sizeof( file->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)file->header, sizeof( file->header )) )
return False;
/* yes, these values are always identical so store them only once */
@@ -261,7 +261,7 @@
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, hbin->header, sizeof( hbin->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)hbin->header, sizeof( hbin->header )) )
return False;
if ( !prs_uint32( "first_hbin_off", ps, depth, &hbin->first_hbin_off ))
@@ -310,7 +310,7 @@
if ( !prs_uint32( "rec_size", ps, depth, &nk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, nk->header, sizeof( nk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)nk->header, sizeof( nk->header )) )
return False;
if ( !prs_uint16( "key_type", ps, depth, &nk->key_type ))
@@ -371,7 +371,7 @@
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, nk->keyname, name_length) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8*)nk->keyname, name_length) )
return False;
if ( UNMARSHALLING(ps) )
@@ -635,7 +635,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &lf->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", &hbin->ps, depth, lf->header, sizeof( lf->header )) )
+ if ( !prs_uint8s( True, "header", &hbin->ps, depth, (uint8*)lf->header, sizeof( lf->header )) )
return False;
if ( !prs_uint16( "num_keys", &hbin->ps, depth, &lf->num_keys))
@@ -689,7 +689,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &sk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, sk->header, sizeof( sk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)sk->header, sizeof( sk->header )) )
return False;
if ( !prs_uint16( "tag", ps, depth, &tag))
return False;
@@ -741,7 +741,7 @@
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &vk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, vk->header, sizeof( vk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8*)vk->header, sizeof( vk->header )) )
return False;
if ( MARSHALLING(&hbin->ps) )
@@ -770,7 +770,7 @@
if ( !(vk->valuename = PRS_ALLOC_MEM( ps, char, name_length+1 )))
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, vk->valuename, name_length ) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8*)vk->valuename, name_length ) )
return False;
}
@@ -1020,7 +1020,7 @@
static BOOL next_record( REGF_HBIN *hbin, const char *hdr, BOOL *eob )
{
- char header[REC_HDR_SIZE] = "";
+ uint8 header[REC_HDR_SIZE];
uint32 record_size;
uint32 curr_off, block_size;
BOOL found = False;
@@ -1037,6 +1037,7 @@
block_size = prs_data_size( ps );
record_size = 0;
+ memset( header, 0x0, sizeof(uint8)*REC_HDR_SIZE );
while ( !found ) {
curr_off = curr_off+record_size;
More information about the samba-cvs
mailing list