Bug 2479 - lib/username.c & lib/access.c: "const char*" incompatible with "char *" innetgr() on Irix
Summary: lib/username.c & lib/access.c: "const char*" incompatible with "char *" innet...
Status: RESOLVED WONTFIX
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-17 15:17 UTC by Jason Mader (mail bounces back)
Modified: 2005-03-22 10:16 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) 2005-03-17 15:17:50 UTC
Compiling lib/username.c
cc-1164 cc: WARNING File = lib/username.c, Line = 322
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

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

cc-1164 cc: WARNING File = lib/username.c, Line = 322
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

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

cc-1164 cc: WARNING File = lib/username.c, Line = 338
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

                if (innetgr(ngname, NULL, lowercase_user, mydomain)) {
                            ^
Comment 1 Jason Mader (mail bounces back) 2005-03-17 15:20:59 UTC
On Irix <netdb.h>:

extern int      innetgr(char *, char *, char *, char *);
Comment 2 Jelmer Vernooij 2005-03-17 16:09:06 UTC
This parameter is "const char *" on several other OS'es (Linux, Mac OS X, FreeBSD, OpenBSD). 
Comment 3 Jason Mader (mail bounces back) 2005-03-18 10:23:14 UTC
Compiling lib/access.c
cc-1164 cc: WARNING File = lib/access.c, Line = 94
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

                netgroup_ok = innetgr(tok + 1, hostname, (char *) 0, mydomain);
                                      ^
Comment 4 Jason Mader (mail bounces back) 2005-03-18 12:01:49 UTC
Compiling auth/auth_rhosts.c
cc-1164 cc: WARNING File = auth/auth_rhosts.c, Line = 91
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .

              if (mydomain && innetgr(file_host,remote,user,mydomain))
                                                ^

cc-1164 cc: WARNING File = auth/auth_rhosts.c, Line = 91
  Argument of type "const char *" is incompatible with parameter of type "char *"
          .                                                                    
                                                         

              if (mydomain && innetgr(file_host,remote,user,mydomain))
                                                       ^
Comment 5 Gerald (Jerry) Carter (dead mail address) 2005-03-22 10:16:01 UTC
Thanks.  I'm not going to fix this one.  Mostly 
because this seems to be an IRIX only issue.
Not that IRIX isn't important, but the hoops to just 
through to get the compiler to be quiet would make the code
look a lot messier.

Someone else can send in a patch for review though.  And i'm 
happy to re-evaluate this decision.