Bug 2485 - lib/privileges.c, Line 495: "unsigned int *" incompatible with "int *"
Summary: lib/privileges.c, Line 495: "unsigned int *" incompatible with "int *"
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.11
Hardware: SGI IRIX
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-18 11:20 UTC by Jason Mader (mail bounces back)
Modified: 2005-08-24 10:16 UTC (History)
0 users

See Also:


Attachments
changes num to "unsigned int *" (1.36 KB, patch)
2005-03-18 11:56 UTC, Jason Mader (mail bounces back)
no flags Details
changes to lib/util_sid.c and groupdb/mapping.c (3.42 KB, patch)
2005-03-18 12:15 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-03-18 11:20:50 UTC
Samba 3.0.12rc1

Compiling lib/privileges.c
cc-1164 cc: WARNING File = lib/privileges.c, Line = 495
  Argument of type "unsigned int *" is incompatible with parameter of type
          "int *".

        add_sid_to_array( &sid, &priv->sids.list, &priv->sids.count );
                                                  ^
Comment 1 Jason Mader (mail bounces back) 2005-03-18 11:56:38 UTC
Created attachment 1048 [details]
changes num to "unsigned int *"

I changed the argument num of add_sid_to_array() and related add/del sid
functions to "unsigned int *", and that compiled without warning.
Comment 2 Jason Mader (mail bounces back) 2005-03-18 12:04:02 UTC
Compiling groupdb/mapping.c
cc-1164 cc: WARNING File = groupdb/mapping.c, Line = 521
  Argument of type "int *" is incompatible with parameter of type
          "unsigned int *".

                add_sid_to_array_unique(&alias, sids, num);
                                                      ^

cc-1164 cc: WARNING File = groupdb/mapping.c, Line = 668
  Argument of type "int *" is incompatible with parameter of type
          "unsigned int *".

                add_sid_to_array(&member, closure->sids, closure->num);
                                                         ^
Comment 3 Jason Mader (mail bounces back) 2005-03-18 12:15:42 UTC
Created attachment 1049 [details]
changes to lib/util_sid.c and groupdb/mapping.c

Side effects found in mapping.c, so I've revised the patch.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-03-22 08:30:58 UTC
fixed by changing the SID_LIST.count declaration.
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:16:24 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.