Fix warnings in kauth/authclient.c
authorAndrew Deason <adeason@sinenomine.net>
Wed, 7 Oct 2009 22:48:52 +0000 (17:48 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 8 Oct 2009 10:42:19 +0000 (03:42 -0700)
 -- In ka_Authenticate, explicitly cast 'start' and 'end' to void*,
    since kawrap_ubik_Call takes all arguments as void*s

 -- Fix kawrap_ubik_Call to not be an old-style declaration

 -- Only ignore strict prototypes and implicit function declaration
    warnings

Reviewed-on: http://gerrit.openafs.org/597
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

README.WARNINGS
src/kauth/Makefile.in
src/kauth/authclient.c

index 6dd52ed..106c101 100644 (file)
@@ -68,7 +68,8 @@ kauth/kaprocs.c            : all           : XXX
 kauth/kaserver.c     : all          : ExtendedCellInfo
 kauth/krb_udp.c      : all           : XXX
 kauth/admin_tools.c  : all           : ubik_Call nonsense
-kauth/authclient.c   : all           : ubik_Call nonsense
+kauth/authclient.c   : strict-proto  : ubik_Call nonsense
+                     : implicit-func : ubik_Call nonsense
 kauth/kas.c          : all           : XXX
 kauth/klog.c         : all           : XXX
 kauth/ka-forwarder.c : all           : XXX
index 7b81fba..fa10480 100644 (file)
@@ -101,7 +101,7 @@ kaprocs.o: kaprocs.c ${INCLS} kaport.h
        ${CC} ${CFLAGS} @CFLAGS_NOERROR@ -c $<
 
 authclient.o: authclient.c ${INCLS}
-       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+       $(CC) $(CFLAGS) -c $<
 
 kaauxdb.o: kaauxdb.c
        $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
index 4feba28..560f4ce 100644 (file)
 #include <afs/param.h>
 #endif
 
+#ifdef IGNORE_SOME_GCC_WARNINGS
+# pragma GCC diagnostic warning "-Wstrict-prototypes"
+# pragma GCC diagnostic warning "-Wimplicit-function-declaration"
+#endif
 
 #define UBIK_LEGACY_CALLITER 1
 
@@ -456,11 +460,9 @@ CheckTicketAnswer(ka_BBS * oanswer, afs_int32 challenge,
  * this doesn't handle UNOTSYNC very well, should use ubik_Call if you care
  */
 static afs_int32
-kawrap_ubik_Call(aproc, aclient, aflags, p1, p2, p3, p4, p5, p6, p7, p8)
-     struct ubik_client *aclient;
-     int (*aproc) ();
-     afs_int32 aflags;
-     void *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8;
+kawrap_ubik_Call(int (*aproc) (), struct ubik_client *aclient,
+                 afs_int32 aflags, void *p1, void *p2, void *p3, void *p4,
+                 void *p5, void *p6, void *p7, void *p8)
 {
     afs_int32 code, lcode;
     int count;
@@ -562,7 +564,7 @@ ka_Authenticate(char *name, char *instance, char *cell, struct ubik_client * con
     version = 2;
     code =
        kawrap_ubik_Call(KAA_AuthenticateV2, conn, 0, name, instance,
-                        start, end, &arequest, &oanswer, 0, 0);
+                        (void*)start, (void*)end, &arequest, &oanswer, 0, 0);
     if (code == RXGEN_OPCODE) {
        oanswer.MaxSeqLen = sizeof(answer);
        oanswer.SeqBody = (char *)&answer;