diff --git a/src/Cedar/EtherLog.c b/src/Cedar/EtherLog.c index c32421e7..26ddf654 100644 --- a/src/Cedar/EtherLog.c +++ b/src/Cedar/EtherLog.c @@ -276,7 +276,7 @@ UINT EcConnect(char *host, UINT port, char *password, RPC **rpc) // RPC server function PACK *ElRpcServer(RPC *r, char *name, PACK *p) { - EL *e = (EL *)r->Param; + EL *e; PACK *ret; UINT err; bool ok; @@ -286,6 +286,7 @@ PACK *ElRpcServer(RPC *r, char *name, PACK *p) return NULL; } + e = (EL *)r->Param; ret = NewPack(); err = ERR_NO_ERROR; ok = false; diff --git a/src/Cedar/Nat.c b/src/Cedar/Nat.c index 59d0d8a0..7269e6b7 100644 --- a/src/Cedar/Nat.c +++ b/src/Cedar/Nat.c @@ -299,7 +299,7 @@ RPC *NatAdminConnect(CEDAR *cedar, char *hostname, UINT port, void *hashed_passw // RPC server function PACK *NiRpcServer(RPC *r, char *name, PACK *p) { - NAT *n = (NAT *)r->Param; + NAT *n; PACK *ret; UINT err; bool ok; @@ -309,6 +309,7 @@ PACK *NiRpcServer(RPC *r, char *name, PACK *p) return NULL; } + n = (NAT *)r->Param; ret = NewPack(); err = ERR_NO_ERROR; ok = false; diff --git a/src/Cedar/Session.c b/src/Cedar/Session.c index 451839a9..5bd5fa19 100644 --- a/src/Cedar/Session.c +++ b/src/Cedar/Session.c @@ -1006,7 +1006,7 @@ void ClientAdditionalConnectChance(SESSION *s) (s->NextConnectionTime <= now)) { // Start the work to put an additional connection - s->NextConnectionTime = now + (UINT64)(s->ClientOption->AdditionalConnectionInterval * 1000); + s->NextConnectionTime = now + s->ClientOption->AdditionalConnectionInterval * (UINT64)1000U; SessionAdditionalConnect(s); } else diff --git a/src/Mayaqua/Tick64.c b/src/Mayaqua/Tick64.c index 92f74c0b..9ec568ae 100644 --- a/src/Mayaqua/Tick64.c +++ b/src/Mayaqua/Tick64.c @@ -133,11 +133,10 @@ static EVENT *halt_tick_event = NULL; // Get the high-resolution time UINT64 TickHighres64() { - UINT64 ret = 0; #ifdef OS_WIN32 - ret = (UINT64)(MsGetHiResTimeSpan(MsGetHiResCounter()) * 1000.0f); + return (UINT64)(MsGetHiResTimeSpan(MsGetHiResCounter()) * 1000.0f); #else // OS_WIN32 @@ -145,7 +144,6 @@ UINT64 TickHighres64() #endif // OS_WIN32 - return ret; } // Convert the Tick value to time