summaryrefslogtreecommitdiffstats
path: root/hicn-light/src/strategies/loadBalancerWithPD.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/loadBalancerWithPD.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/loadBalancerWithPD.c')
-rw-r--r--hicn-light/src/strategies/loadBalancerWithPD.c10
1 files changed, 5 insertions, 5 deletions
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) {