From: Nathan Neulinger Date: Fri, 5 Oct 2001 22:05:16 +0000 (+0000) Subject: ubik-warning-cleanup-20011005 X-Git-Tag: openafs-devel-1_3_0~256 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=366a772a80357ab09a9dd02cb34ef87cdfab25ec;p=packages%2Fo%2Fopenafs.git ubik-warning-cleanup-20011005 clean up warnings (mostly new headers or added parens) in ubik --- diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 3fc756c62..f039557c4 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -25,6 +25,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include @@ -50,6 +57,7 @@ int (*ubik_CRXSecurityProc)(); char *ubik_CRXSecurityRock; afs_int32 ubikSecIndex; struct rx_securityClass *ubikSecClass; +static verifyInterfaceAddress(); /* Module responsible for both deciding if we're currently the sync site, @@ -170,7 +178,7 @@ ubeacon_InitServerListCommon(ame, info, clones, aservers) struct ubik_server *magicServer; /* verify that the addresses passed in are correct */ - if (code = verifyInterfaceAddress(&ame, info, aservers)) + if ((code = verifyInterfaceAddress(&ame, info, aservers))) return code; /* get the security index to use, if we can */ @@ -229,7 +237,7 @@ ubeacon_InitServerListCommon(ame, info, clones, aservers) } } else { i = 0; - while (servAddr = *aservers++) { + while ((servAddr = *aservers++)) { if (i >= MAXSERVERS) return UNHOSTS; /* too many hosts */ ts = (struct ubik_server *) malloc(sizeof(struct ubik_server)); memset(ts, 0, sizeof(struct ubik_server)); diff --git a/src/ubik/disk.c b/src/ubik/disk.c index bf9785b9f..a41aef44b 100644 --- a/src/ubik/disk.c +++ b/src/ubik/disk.c @@ -20,6 +20,13 @@ RCSID("$Header$"); #include #endif #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include diff --git a/src/ubik/phys.c b/src/ubik/phys.c index 70f31c46b..0fcaf8f56 100644 --- a/src/ubik/phys.c +++ b/src/ubik/phys.c @@ -25,6 +25,13 @@ RCSID("$Header$"); #include #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #define UBIK_INTERNALS 1 #include "ubik.h" diff --git a/src/ubik/recovery.c b/src/ubik/recovery.c index b5d6409bd..f4b0a40f2 100644 --- a/src/ubik/recovery.c +++ b/src/ubik/recovery.c @@ -23,6 +23,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include @@ -365,7 +372,7 @@ urecovery_Initialize(adbase) */ urecovery_Interact() { afs_int32 code, tcode; - struct ubik_server *bestServer; + struct ubik_server *bestServer = NULL; struct ubik_server *ts; int dbok, doingRPC, now; afs_int32 lastProbeTime, lastDBVCheck; diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 6f0d9438e..bb5354a7b 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -19,6 +19,13 @@ RCSID("$Header$"); #include #include #endif +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include @@ -58,7 +65,7 @@ SDISK_Begin(rxcall, atid) { register afs_int32 code; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } DBHOLD(ubik_dbase); @@ -87,7 +94,7 @@ SDISK_Commit(rxcall, atid) register afs_int32 code; register struct ubik_dbase *dbase; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } @@ -125,7 +132,7 @@ SDISK_ReleaseLocks(rxcall, atid) register struct ubik_dbase *dbase; register afs_int32 code; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } @@ -161,7 +168,7 @@ SDISK_Abort(rxcall, atid) register afs_int32 code; register struct ubik_dbase *dbase; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } @@ -200,7 +207,7 @@ SDISK_Lock(rxcall, atid, afile, apos, alen, atype) register struct ubik_dbase *dbase; struct ubik_trans *ubik_thisTrans; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } if (!ubik_currentTrans) { @@ -249,7 +256,7 @@ SDISK_WriteV(rxcall, atid, io_vector, io_buffer) struct ubik_iovec *iovec; char *iobuf; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } if (!ubik_currentTrans) { @@ -296,7 +303,7 @@ SDISK_Write(rxcall, atid, afile, apos, adata) register afs_int32 code; register struct ubik_dbase *dbase; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } if (!ubik_currentTrans) { @@ -328,7 +335,7 @@ SDISK_Truncate(rxcall, atid, afile, alen) register afs_int32 code; register struct ubik_dbase *dbase; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } if (!ubik_currentTrans) { @@ -357,7 +364,7 @@ SDISK_GetVersion(rxcall, aversion) { register afs_int32 code; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } @@ -401,7 +408,7 @@ SDISK_GetFile(rxcall, file, version) afs_int32 tlen; afs_int32 length; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return code; } /* temporarily disabled because it causes problems for migration tool. Hey, it's just @@ -463,7 +470,7 @@ SDISK_SendFile(rxcall, file, length, avers) /* send the file back to the requester */ - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { goto failed; } @@ -640,7 +647,7 @@ SDISK_SetVersion(rxcall, atid, oldversionp, newversionp) afs_int32 code=0; struct ubik_dbase *dbase; - if (code = ubik_CheckAuth(rxcall)) { + if ((code = ubik_CheckAuth(rxcall))) { return(code); } diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index a413ba3e9..12772caa2 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -22,6 +22,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include diff --git a/src/ubik/ubikcmd.c b/src/ubik/ubikcmd.c index 0aad08a85..8a0c119e4 100644 --- a/src/ubik/ubikcmd.c +++ b/src/ubik/ubikcmd.c @@ -23,6 +23,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include diff --git a/src/ubik/utst_client.c b/src/ubik/utst_client.c index 2f9e832f0..88a407310 100644 --- a/src/ubik/utst_client.c +++ b/src/ubik/utst_client.c @@ -23,6 +23,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include diff --git a/src/ubik/utst_server.c b/src/ubik/utst_server.c index 038e02767..49d05123e 100644 --- a/src/ubik/utst_server.c +++ b/src/ubik/utst_server.c @@ -24,6 +24,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include diff --git a/src/ubik/vote.c b/src/ubik/vote.c index 28e75e2f1..e850aa877 100644 --- a/src/ubik/vote.c +++ b/src/ubik/vote.c @@ -21,6 +21,13 @@ RCSID("$Header$"); #endif #include #include +#ifdef HAVE_STRING_H +#include +#else +#ifdef HAVE_STRINGS_H +#include +#endif +#endif #include #include #include