Bug 2479 - lib/username.c & lib/access.c: "const char*" incompatible with "char *" innetgr() on Irix
lib/username.c & lib/access.c: "const char*" incompatible with "char *" innet...
Status: RESOLVED WONTFIX
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient
3.0.11
SGI IRIX
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-17 15:17 UTC by Jason Mader
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 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 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 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 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 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.