diff options
author | 2019-02-10 13:34:22 +0100 | |
---|---|---|
committer | 2019-02-10 14:23:51 +0100 | |
commit | 1ac41cb08281bf5460dfea5fc40ff6f8e14873a1 (patch) | |
tree | 3926983e45afa7e805cca1429fc3452c57a5b6c3 /hicn-light/src/strategies/rndSegment.c | |
parent | 13ec18b4b3ec8455daad674a0c0e616885b83608 (diff) |
[HICN-49] Remove warnings hicn-light on windows
Change-Id: I106713c285ad5cc47cb5ae3aaf9c837685156e36
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'hicn-light/src/strategies/rndSegment.c')
-rw-r--r-- | hicn-light/src/strategies/rndSegment.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hicn-light/src/strategies/rndSegment.c b/hicn-light/src/strategies/rndSegment.c index 2000ed7b7..5ed9bf1a9 100644 --- a/hicn-light/src/strategies/rndSegment.c +++ b/hicn-light/src/strategies/rndSegment.c @@ -74,7 +74,7 @@ StrategyImpl *strategyRndSegment_Create() { strategy->nexthops = numberSet_Create(); strategy->segmentName = NULL; strategy->last_used_face = 0; - srand(time(NULL)); + srand((unsigned int)time(NULL)); StrategyImpl *impl = parcMemory_AllocateAndClear(sizeof(StrategyImpl)); parcAssertNotNull(impl, "parcMemory_AllocateAndClear(%zu) returned NULL", @@ -93,7 +93,7 @@ strategy_type _strategyRndSegment_GetStrategy(StrategyImpl *strategy) { } static int _select_Nexthop(StrategyRndSegment *strategy) { - unsigned len = numberSet_Length(strategy->nexthops); + unsigned len = (unsigned)numberSet_Length(strategy->nexthops); if (len == 0) { return -1; } @@ -115,7 +115,7 @@ static NumberSet *_strategyRndSegment_LookupNexthop( StrategyRndSegment *srnd = (StrategyRndSegment *)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) || @@ -168,7 +168,7 @@ static NumberSet *_strategyRndSegment_ReturnNexthops(StrategyImpl *strategy) { unsigned _strategyRndSegment_CountNexthops(StrategyImpl *strategy) { StrategyRndSegment *srnd = (StrategyRndSegment *)strategy->context; - return numberSet_Length(srnd->nexthops); + return (unsigned)numberSet_Length(srnd->nexthops); } static void _strategyRndSegment_AddNexthop(StrategyImpl *strategy, |