Bug 4499 - innetgr(): "const char *" is incompatible with parameter of type "char *"
Summary: innetgr(): "const char *" is incompatible with parameter of type "char *"
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.25
Hardware: SGI IRIX
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-10 10:11 UTC by Jason Mader (mail bounces back)
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 (mail bounces back) 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.