Bug 4499 - innetgr(): "const char *" is incompatible with parameter of type "char *"
innetgr(): "const char *" is incompatible with parameter of type "char *"
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
3.0.25
SGI IRIX
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-10 10:11 UTC by Jason Mader
Modified: 2007-04-10 14:37 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 2007-04-10 10:11:40 UTC
In 3.0.25rc1,

--- smbd/password.o ---
cc-1164 c99: WARNING File = smbd/password.c, Line = 452
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

        if (innetgr(ngname, NULL, user, mydomain)) {
                    ^

cc-1164 c99: WARNING File = smbd/password.c, Line = 452
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

        if (innetgr(ngname, NULL, user, mydomain)) {
                                  ^

cc-1164 c99: WARNING File = smbd/password.c, Line = 468
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

                if (innetgr(ngname, NULL, lowercase_user, mydomain)) {
                            ^
--- lib/access.o ---
cc-1164 c99: WARNING File = lib/access.c, Line = 93
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

                netgroup_ok = innetgr(tok + 1, hostname, (char *) 0, mydomain);
                                      ^
Comment 1 Jeremy Allison 2007-04-10 14:37:22 UTC
Actually I think this is a case where the header definitions in IRIX are incorrect. This is the Linux definition :

       int innetgr(const char *netgroup, const char *host,
                   const char *user, const char *domain);

The character strings should be const, as innetgr will not modify them.

Jeremy.