summaryrefslogtreecommitdiffstats
path: root/hicn-light/src/strategies/rnd.c
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-02-10 13:34:22 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-02-10 14:23:51 +0100
commit1ac41cb08281bf5460dfea5fc40ff6f8e14873a1 (patch)
tree3926983e45afa7e805cca1429fc3452c57a5b6c3 /hicn-light/src/strategies/rnd.c
parent13ec18b4b3ec8455daad674a0c0e616885b83608 (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/rnd.c')
-rw-r--r--hicn-light/src/strategies/rnd.c8
1 files changed, 4 insertions, 4 deletions
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,