X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=tests%2Frpctestlib%2Frpc_test_procs.c;h=7b70a861cc38515c5ef86ab32cbffe9db0fcd761;hp=9a99cd1564c9ee9f19073ad9d89c191bcf930ab4;hb=3db647e327bbb4621f4d66f85678424471453703;hpb=262a678d9b7b79f5261af2a8b36588f684e547ef diff --git a/tests/rpctestlib/rpc_test_procs.c b/tests/rpctestlib/rpc_test_procs.c index 9a99cd1..7b70a86 100644 --- a/tests/rpctestlib/rpc_test_procs.c +++ b/tests/rpctestlib/rpc_test_procs.c @@ -30,62 +30,35 @@ #include #include -#include -#include "rpc_test_procs.h" +#include -#include -#include -#include +#include -#ifdef AFS_NT40_ENV -#else -#include -#include -#include -#include -#include -#include -#include -#endif +#include "rpc_test_procs.h" -#include -#include #ifdef AFS_NT40_ENV -#include #include #include #else -#include +#include #include #include -#include #endif #include #define FSINT_COMMON_XG 1 -#include -#include -#include #include #include #include #include #include -#ifdef HAVE_DIRENT_H -#include -#endif #ifdef HAVE_DIRECT_H #include #endif -#ifdef AFS_DARWIN_ENV -#include -#else -#include -#endif #include #include -#include +#include #ifdef AFS_PTHREAD_ENV #include #endif @@ -109,7 +82,7 @@ typedef struct rpc_test_pkg_params { } rpc_test_pkg_params; static rpc_test_pkg_params rpc_test_params; -afs_int32 rpc_test_PkgInit() +afs_int32 rpc_test_PkgInit(void) { afs_int32 code = 0; static afs_uint32 rpc_test_initialized = 0; /* once */ @@ -117,7 +90,7 @@ afs_int32 rpc_test_PkgInit() if (!rpc_test_initialized) { rpc_test_initialized = 1; } else { - printf("%s: rpc_test_PkgInit: package already initialized\n"); + printf("%s: rpc_test_PkgInit: package already initialized\n", prog); exit(1); } @@ -153,7 +126,6 @@ init_callback_service_lwp(void *arg) { struct rx_securityClass *sc; struct rx_service *svc; - afs_int32 code = 0; rpc_test_request_ctx *ctx = (rpc_test_request_ctx *) arg; @@ -192,7 +164,7 @@ init_callback_service_lwp(void *arg) rx_StartServer(1); - printf("%s: init_callback_service_lwp: finished"); + printf("%s: init_callback_service_lwp: finished", prog); return (NULL); @@ -227,7 +199,6 @@ afs_int32 init_fs_channel(rpc_test_request_ctx **octx, char *cb_if, char *listen_addr_s, char *prefix, char *fs_addr_s, afs_uint32 flags) { - char cmd[512]; rpc_test_request_ctx *ctx; afs_int32 code = 0; #ifdef AFS_NT40_ENV @@ -248,10 +219,10 @@ afs_int32 init_fs_channel(rpc_test_request_ctx **octx, char *cb_if, /* afscbint (server) */ sprintf(ctx->cb_svc_name, "cb_%d", ctx->cno); - sprintf(ctx->cb_if_s, cb_if); - sprintf(ctx->cb_listen_addr_s, listen_addr_s); - sprintf(ctx->cb_prefix_s, prefix); - sprintf(ctx->fs_addr_s, fs_addr_s); + sprintf(ctx->cb_if_s, "%s", cb_if); + sprintf(ctx->cb_listen_addr_s, "%s", listen_addr_s); + sprintf(ctx->cb_prefix_s, "%s", prefix); + sprintf(ctx->fs_addr_s, "%s", fs_addr_s); #if defined(RPC_TEST_ADD_ADDRESSES) #if defined(AFS_LINUX26_ENV) @@ -294,7 +265,6 @@ afs_int32 init_fs_channel(rpc_test_request_ctx **octx, char *cb_if, /* unlock this */ pthread_mutex_unlock(&ctx->mtx); -out: return (code); } /* init_fs_channel */ @@ -317,7 +287,6 @@ afs_int32 rpc_test_afs_fetch_status(rpc_test_request_ctx *ctx, AFSFid *fid, AFSFetchStatus *outstatus) { - struct rx_call *tcall; struct AFSVolSync tsync; struct AFSCallBack tcb; afs_int32 code = 0; @@ -333,7 +302,6 @@ afs_int32 rpc_test_afs_store_status(rpc_test_request_ctx *ctx, AFSFid *fid, AFSStoreStatus *instatus, AFSFetchStatus *outstatus) { - struct rx_call *tcall; struct AFSVolSync tsync; afs_int32 code = 0; @@ -397,7 +365,6 @@ afs_int32 rpc_test_afs_downgrade_byterangelock(rpc_test_request_ctx *ctx, afs_int32 destroy_fs_channel(rpc_test_request_ctx *ctx) { - char cmd[512]; afs_int32 code = 0; #if defined(RPC_TEST_ADD_ADDRESSES) #if defined(AFS_LINUX26_ENV) @@ -413,8 +380,6 @@ destroy_fs_channel(rpc_test_request_ctx *ctx) } /* destroy_fs_channel */ void -rpc_test_PkgShutdown() +rpc_test_PkgShutdown(void) { - afs_int32 code = 0; - } /* rpc_test_PkgShutdown */