Bug 2900 - registry/regfio.c: prs_uint8s()
registry/regfio.c: prs_uint8s()
Status: CLOSED 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-07-19 08:02 UTC by Jason Mader
Modified: 2005-08-24 10:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Mader 2005-07-19 08:02:47 UTC
cc-1164 cc: WARNING File = registry/regfio.c, Line = 202
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

        if ( !prs_uint8s( True, "header", ps, depth, file->header, sizeof( file->header )) )
                                                     ^

cc-1164 cc: WARNING File = registry/regfio.c, Line = 264
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

        if ( !prs_uint8s( True, "header", ps, depth, hbin->header, sizeof( hbin->header )) )
                                                     ^

cc-1164 cc: WARNING File = registry/regfio.c, Line = 313
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".
 
        if ( !prs_uint8s( True, "header", ps, depth, nk->header, sizeof( nk->header )) )
                                                     ^

(and many more)
Comment 1 Jason Mader 2005-07-19 08:05:40 UTC
I think several of the struct's defined in include/regfio.h should have their element "header" defined as a 
uint8 type.
Comment 2 Jason Mader 2005-07-19 08:08:43 UTC
Additional:

cc-1164 cc: WARNING File = registry/regfio.c, Line = 374
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

                if ( !prs_uint8s( True, "name", ps, depth, nk->keyname, name_length) )
                                                           ^

cc-1164 cc: WARNING File = registry/regfio.c, Line = 773
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

                if ( !prs_uint8s( True, "name", ps, depth, vk->valuename, name_length ) )
                                                           ^

cc-1164 cc: WARNING File = registry/regfio.c, Line = 1051
  Argument of type "char *" is incompatible with parameter of type
          "unsigned char *".

                if ( !prs_uint8s( True, "header", ps, 0, header, REC_HDR_SIZE ) )
                                                         ^
Comment 3 Jason Mader 2005-07-19 08:12:51 UTC
nk->keyname and vk->valuename are used in strlen() and cannot cleanly become "uint8".
Comment 4 Gerald (Jerry) Carter 2005-07-19 09:16:16 UTC
I'm just going to cast these to uint8* as needed.
The cast is ok and should quiet the compiler some.
Comment 5 Gerald (Jerry) Carter 2005-08-24 10:27:12 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.