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/rnd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hicn-light/src/strategies/rnd.c') diff --git a/hicn-light/src/strategies/rnd.c b/hicn-light/src/strategies/rnd.c index 37f3f6f30..35b9e87c6 100644 --- a/hicn-light/src/strategies/rnd.c +++ b/hicn-light/src/strategies/rnd.c @@ -68,7 +68,7 @@ StrategyImpl *strategyRnd_Create() { sizeof(StrategyRnd)); 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", @@ -86,7 +86,7 @@ strategy_type _strategyRnd_GetStrategy(StrategyImpl *strategy) { } static int _select_Nexthop(StrategyRnd *strategy) { - unsigned len = numberSet_Length(strategy->nexthops); + unsigned len = (unsigned)numberSet_Length(strategy->nexthops); if (len == 0) { return -1; } @@ -108,7 +108,7 @@ static NumberSet *_strategyRnd_LookupNexthop(StrategyImpl *strategy, StrategyRnd *srnd = (StrategyRnd *)strategy->context; unsigned in_connection = message_GetIngressConnectionId(interestMessage); - unsigned nexthopSize = numberSet_Length(srnd->nexthops); + unsigned nexthopSize = (unsigned)numberSet_Length(srnd->nexthops); NumberSet *out = numberSet_Create(); if ((nexthopSize == 0) || @@ -139,7 +139,7 @@ static NumberSet *_strategyRnd_ReturnNexthops(StrategyImpl *strategy) { unsigned _strategyRnd_CountNexthops(StrategyImpl *strategy) { StrategyRnd *srnd = (StrategyRnd *)strategy->context; - return numberSet_Length(srnd->nexthops); + return (unsigned)numberSet_Length(srnd->nexthops); } static void _strategyRnd_AddNexthop(StrategyImpl *strategy, -- cgit 1.2.3-korg