]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
const char paths for ubik_ServerInit
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Wed, 11 Nov 2009 10:28:29 +0000 (10:28 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 11 Nov 2009 17:17:25 +0000 (09:17 -0800)
ubik_ServerInit* take a pathname, which should really be a const.
It already is in many of the callers, some of which remove the
const by casting, the others throw errors.

Make pathName const for all of ubik_ServerInitByInfo, ubik_ServerInit
and ubik_ServerInitCommon.
Update all of our callers to remove the now unecessary casting.
Remove the now uneccessary warning inhibition on vlserver/vlserver.c

Change-Id: I009103dc49e4473eec65ebd75aab727915c26f3c
Reviewed-on: http://gerrit.openafs.org/811
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
README.WARNINGS
src/kauth/kaserver.c
src/ptserver/ptserver.c
src/ptserver/ubik.c
src/ubik/ubik.c
src/ubik/ubik.p.h
src/vlserver/Makefile.in

index c151e49052542f6c828d11356c7ab81b97a2abb1..409bdd9b93382b96a36093a31ea65444f17eaa6d 100644 (file)
@@ -80,7 +80,6 @@ uss/uss_vol.c              : all             Format issues
 uss/uss_kauth.c      : all          : Des keys, ubik_Call
 uss/lex.yy.c         : all           : Unused symbols
 viced/fsprobe.c      : all          : ubik_Call
-vlserver/vlserver.c  : all          : GetExtendedCellInfo
 vol/salvager.c       : all           : consts & undefined variable from header
 volser/vos.c         : all          : ubik_Call_New
 volser/vol-dump.c    : format        : afs_sfsize_t
index cab9a768a170b548fc55e615f5c8c6d05141c88c..8b0c80ab13bc66d9f9c368759c71298f17fbacff 100644 (file)
@@ -385,11 +385,11 @@ main(int argc, char *argv[])
     if (servers)
        code =
            ubik_ServerInit(myHost, htons(AFSCONF_KAUTHPORT), serverList,
-                           (char *)dbpath, &KA_dbase);
+                           dbpath, &KA_dbase);
     else
        code =
            ubik_ServerInitByInfo(myHost, htons(AFSCONF_KAUTHPORT), &cellinfo,
-                                 clones, (char *)dbpath, &KA_dbase);
+                                 clones, dbpath, &KA_dbase);
 
     if (code) {
        afs_com_err(whoami, code, "Ubik init failed");
index 2c958a9f6151e78db96a2ba24e447a92e5e62fbf..803a0d2718deab871ac2b4ddff4673de74293f92 100644 (file)
@@ -522,7 +522,7 @@ main(int argc, char **argv)
 
     code =
        ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, clones,
-                             (char *)pr_dbaseName, &dbase);
+                             pr_dbaseName, &dbase);
     if (code) {
        afs_com_err(whoami, code, "Ubik init failed");
        PT_EXIT(2);
index 4cec9f6817d2c3faafacf0aa300f32deefbace97..b5cdf618192e67178eb0d4f90dfdb984754e604b 100644 (file)
@@ -27,7 +27,7 @@ struct ubik_dbase *dbase;
 
 int
 ubik_ServerInit(afs_int32 myHost, short myPort, afs_int32 serverList[],
-                char *pathName, struct ubik_dbase **dbase)
+                const char *pathName, struct ubik_dbase **dbase)
 {
     return (0);
 }
index 09374f8a8711775eaa594e042fcd2d8637f6b2ea..f72032f9a1977b747d8b12cdee3492a343c94c90 100644 (file)
@@ -385,7 +385,7 @@ ContactQuorum_DISK_SetVersion(register struct ubik_trans *atrans, int aflags,
 int
 ubik_ServerInitCommon(afs_int32 myHost, short myPort,
                      struct afsconf_cell *info, char clones[],
-                     afs_int32 serverList[], char *pathName,
+                     afs_int32 serverList[], const char *pathName,
                      struct ubik_dbase **dbase)
 {
     register struct ubik_dbase *tdb;
@@ -560,7 +560,7 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort,
 int
 ubik_ServerInitByInfo(afs_int32 myHost, short myPort,
                      struct afsconf_cell *info, char clones[],
-                     char *pathName, struct ubik_dbase **dbase)
+                     const char *pathName, struct ubik_dbase **dbase)
 {
     afs_int32 code;
 
@@ -575,7 +575,7 @@ ubik_ServerInitByInfo(afs_int32 myHost, short myPort,
  */
 int
 ubik_ServerInit(afs_int32 myHost, short myPort, afs_int32 serverList[],
-               char *pathName, struct ubik_dbase **dbase)
+               const char *pathName, struct ubik_dbase **dbase)
 {
     afs_int32 code;
 
index 32d5ebe7cb0e168880e744092a23c330b2c23672..315a80f4612024629c48a808119821ff5ca0543a 100644 (file)
@@ -455,10 +455,11 @@ extern afs_int32 ubik_nBuffers;
 struct afsconf_cell;
 extern int ubik_ServerInitByInfo(afs_int32 myHost, short myPort,
                                 struct afsconf_cell *info, char clones[],
-                                char *pathName, struct ubik_dbase **dbase);
+                                const char *pathName,
+                                struct ubik_dbase **dbase);
 extern int ubik_ServerInit(afs_int32 myHost, short myPort, 
                           afs_int32 serverList[],
-                          char *pathName, struct ubik_dbase **dbase);
+                          const char *pathName, struct ubik_dbase **dbase);
 extern int ubik_BeginTrans(register struct ubik_dbase *dbase,
                           afs_int32 transMode, struct ubik_trans **transPtr);
 extern int ubik_BeginTransReadAny(register struct ubik_dbase *dbase,
index b4c5d708df0b628e230813684f5a8c561fd390a7..8f4b189851a427f782cd5dadd0f5c12d70bc4e88 100644 (file)
@@ -127,7 +127,7 @@ vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
        $(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
 
 vlserver.o: vlserver.c
-       $(CC) $(CFLAGS) @CFLAGS_NOERROR@ -c $<
+
 system: install
 
 install: vlserver cnvldb vldb_check libvldb.a vl_opcodes.h vlserver.h \