From 1ac41cb08281bf5460dfea5fc40ff6f8e14873a1 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Sun, 10 Feb 2019 13:34:22 +0100 Subject: [HICN-49] Remove warnings hicn-light on windows Change-Id: I106713c285ad5cc47cb5ae3aaf9c837685156e36 Signed-off-by: Angelo Mantellini --- hicn-light/src/strategies/loadBalancerWithPD.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hicn-light/src/strategies/loadBalancerWithPD.c') diff --git a/hicn-light/src/strategies/loadBalancerWithPD.c b/hicn-light/src/strategies/loadBalancerWithPD.c index 1aad8fd89..c9c1479a2 100644 --- a/hicn-light/src/strategies/loadBalancerWithPD.c +++ b/hicn-light/src/strategies/loadBalancerWithPD.c @@ -88,7 +88,7 @@ StrategyImpl *strategyLoadBalancerWithPD_Create() { strategy->min_delay = INT_MAX; strategy->strategy_state = parcHashMap_Create(); strategy->nexthops = numberSet_Create(); - srand(time(NULL)); + srand((unsigned int)time(NULL)); StrategyImpl *impl = parcMemory_AllocateAndClear(sizeof(StrategyImpl)); parcAssertNotNull(impl, "parcMemory_AllocateAndClear(%zu) returned NULL", @@ -128,14 +128,14 @@ static void _update_Stats(StrategyLoadBalancerWithPD *strategy, } static void _sendProbes(StrategyLoadBalancerWithPD *strategy) { - unsigned size = numberSet_Length(strategy->nexthops); + unsigned size = (unsigned)numberSet_Length(strategy->nexthops); for (unsigned i = 0; i < size; i++) { unsigned nhop = numberSet_GetItem(strategy->nexthops, i); Connection *conn = (Connection *)connectionTable_FindById(strategy->connTable, nhop); if (conn != NULL) { connection_Probe(conn); - unsigned delay = connection_GetDelay(conn); + unsigned delay = (unsigned)connection_GetDelay(conn); PARCUnsigned *cid = parcUnsigned_Create(nhop); StrategyNexthopStateWithPD *elem = (StrategyNexthopStateWithPD *)parcHashMap_Get( @@ -249,7 +249,7 @@ static NumberSet *_strategyLoadBalancerWithPD_LookupNexthop( unsigned in_connection = message_GetIngressConnectionId(interestMessage); PARCUnsigned *in = parcUnsigned_Create(in_connection); - unsigned mapSize = parcHashMap_Size(lb->strategy_state); + unsigned mapSize = (unsigned)parcHashMap_Size(lb->strategy_state); NumberSet *outList = numberSet_Create(); if ((mapSize == 0) || @@ -294,7 +294,7 @@ static NumberSet *_strategyLoadBalancerWithPD_ReturnNexthops( unsigned _strategyLoadBalancerWithPD_CountNexthops(StrategyImpl *strategy) { StrategyLoadBalancerWithPD *lb = (StrategyLoadBalancerWithPD *)strategy->context; - return numberSet_Length(lb->nexthops); + return (unsigned)numberSet_Length(lb->nexthops); } static void _strategyLoadBalancerWithPD_resetState(StrategyImpl *strategy) { -- cgit 1.2.3-korg