aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorРуслан Ижбулатов <lrn1986@gmail.com>2017-02-25 12:50:24 +0000
committerРуслан Ижбулатов <lrn1986@gmail.com>2017-02-25 21:03:32 +0000
commit31f699c7eeacc991abad778f881f51b0dbdcbc6d (patch)
treeb8ff1ccf0ec34b3fc7f38c05c7c8e61c7a625c7a /src
parent0eb3848d99441a237ba2a6585a3c054d67f28c53 (diff)
downloadgnunet-31f699c7eeacc991abad778f881f51b0dbdcbc6d.tar.gz
gnunet-31f699c7eeacc991abad778f881f51b0dbdcbc6d.zip
W32: cast ntohl() result to uint32_t
W32 version of ntohl() returns u_long. Thank you, Microsoft!
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-cadet-profiler.c4
-rw-r--r--src/cadet/gnunet-service-cadet-new.c6
-rw-r--r--src/datastore/gnunet-service-datastore.c8
-rw-r--r--src/peerstore/gnunet-service-peerstore.c4
-rw-r--r--src/revocation/revocation_api.c4
-rw-r--r--src/set/gnunet-service-set.c8
6 files changed, 18 insertions, 16 deletions
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c
index d688dc60b..15da05b6d 100644
--- a/src/cadet/gnunet-cadet-profiler.c
+++ b/src/cadet/gnunet-cadet-profiler.c
@@ -778,7 +778,9 @@ pong_handler (void *cls, struct GNUNET_CADET_Channel *channel,
778 latency = GNUNET_TIME_absolute_get_duration (send_time); 778 latency = GNUNET_TIME_absolute_get_duration (send_time);
779 r = ntohl (msg->round_number); 779 r = ntohl (msg->round_number);
780 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n", 780 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n",
781 get_index (peer), get_index (peer->dest), ntohl (msg->counter), 781 get_index (peer),
782 get_index (peer->dest),
783 (uint32_t) ntohl (msg->counter),
782 GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); 784 GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO));
783 785
784 /* Online variance calculation */ 786 /* Online variance calculation */
diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c
index a9b30ccd5..b0a818c7c 100644
--- a/src/cadet/gnunet-service-cadet-new.c
+++ b/src/cadet/gnunet-service-cadet-new.c
@@ -306,8 +306,8 @@ GSC_bind (struct CadetClient *c,
306 GCCH_2s (ch), 306 GCCH_2s (ch),
307 GCP_2s (dest), 307 GCP_2s (dest),
308 GNUNET_h2s (port), 308 GNUNET_h2s (port),
309 ntohl (options), 309 (uint32_t) ntohl (options),
310 ntohl (ccn.channel_of_client)); 310 (uint32_t) ntohl (ccn.channel_of_client));
311 /* notify local client about incoming connection! */ 311 /* notify local client about incoming connection! */
312 env = GNUNET_MQ_msg (cm, 312 env = GNUNET_MQ_msg (cm,
313 GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE); 313 GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE);
@@ -622,7 +622,7 @@ handle_channel_destroy (void *cls,
622 LOG (GNUNET_ERROR_TYPE_DEBUG, 622 LOG (GNUNET_ERROR_TYPE_DEBUG,
623 "%s tried to destroy unknown channel %X\n", 623 "%s tried to destroy unknown channel %X\n",
624 GSC_2s(c), 624 GSC_2s(c),
625 ntohl (msg->ccn.channel_of_client)); 625 (uint32_t) ntohl (msg->ccn.channel_of_client));
626 return; 626 return;
627 } 627 }
628 LOG (GNUNET_ERROR_TYPE_DEBUG, 628 LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 445c3576e..1e699fea3 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -949,7 +949,7 @@ handle_put (void *cls,
949 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 949 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
950 "Processing PUT request for `%s' of type %u\n", 950 "Processing PUT request for `%s' of type %u\n",
951 GNUNET_h2s (&dm->key), 951 GNUNET_h2s (&dm->key),
952 ntohl (dm->type)); 952 (uint32_t) ntohl (dm->type));
953 rid = ntohl (dm->rid); 953 rid = ntohl (dm->rid);
954 size = ntohl (dm->size); 954 size = ntohl (dm->size);
955 if (rid > 0) 955 if (rid > 0)
@@ -1012,7 +1012,7 @@ handle_get (void *cls,
1012 1012
1013 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1013 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1014 "Processing GET request of type %u\n", 1014 "Processing GET request of type %u\n",
1015 ntohl (msg->type)); 1015 (uint32_t) ntohl (msg->type));
1016 GNUNET_STATISTICS_update (stats, 1016 GNUNET_STATISTICS_update (stats,
1017 gettext_noop ("# GET requests received"), 1017 gettext_noop ("# GET requests received"),
1018 1, 1018 1,
@@ -1043,7 +1043,7 @@ handle_get_key (void *cls,
1043 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1043 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1044 "Processing GET request for `%s' of type %u\n", 1044 "Processing GET request for `%s' of type %u\n",
1045 GNUNET_h2s (&msg->key), 1045 GNUNET_h2s (&msg->key),
1046 ntohl (msg->type)); 1046 (uint32_t) ntohl (msg->type));
1047 GNUNET_STATISTICS_update (stats, 1047 GNUNET_STATISTICS_update (stats,
1048 gettext_noop ("# GET KEY requests received"), 1048 gettext_noop ("# GET KEY requests received"),
1049 1, 1049 1,
@@ -1238,7 +1238,7 @@ handle_remove (void *cls,
1238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1238 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1239 "Processing REMOVE request for `%s' of type %u\n", 1239 "Processing REMOVE request for `%s' of type %u\n",
1240 GNUNET_h2s (&dm->key), 1240 GNUNET_h2s (&dm->key),
1241 ntohl (dm->type)); 1241 (uint32_t) ntohl (dm->type));
1242 plugin->api->get_key (plugin->api->cls, 1242 plugin->api->get_key (plugin->api->cls,
1243 0, 1243 0,
1244 &dm->key, 1244 &dm->key,
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c
index 665e625fd..8200c2366 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -523,11 +523,11 @@ handle_store (void *cls,
523 523
524 record = PEERSTORE_parse_record_message (srm); 524 record = PEERSTORE_parse_record_message (srm);
525 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 525 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
526 "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %d.\n", 526 "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %u.\n",
527 record->sub_system, 527 record->sub_system,
528 GNUNET_i2s (record->peer), 528 GNUNET_i2s (record->peer),
529 record->key, 529 record->key,
530 ntohl (srm->options)); 530 (uint32_t) ntohl (srm->options));
531 record->client = client; 531 record->client = client;
532 if (GNUNET_OK != 532 if (GNUNET_OK !=
533 db->store_record (db->cls, 533 db->store_record (db->cls,
diff --git a/src/revocation/revocation_api.c b/src/revocation/revocation_api.c
index fde0296a4..ef659baa0 100644
--- a/src/revocation/revocation_api.c
+++ b/src/revocation/revocation_api.c
@@ -91,7 +91,7 @@ handle_revocation_query_response (void *cls,
91 91
92 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 92 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
93 "Revocation query result: %d\n", 93 "Revocation query result: %d\n",
94 ntohl (qrm->is_valid)); 94 (uint32_t) ntohl (qrm->is_valid));
95 q->func (q->func_cls, 95 q->func (q->func_cls,
96 ntohl (qrm->is_valid)); 96 ntohl (qrm->is_valid));
97 GNUNET_REVOCATION_query_cancel (q); 97 GNUNET_REVOCATION_query_cancel (q);
@@ -225,7 +225,7 @@ handle_revocation_response (void *cls,
225 225
226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 226 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
227 "Revocation transmission result: %d\n", 227 "Revocation transmission result: %d\n",
228 ntohl (rrm->is_valid)); 228 (uint32_t) ntohl (rrm->is_valid));
229 h->func (h->func_cls, 229 h->func (h->func_cls,
230 ntohl (rrm->is_valid)); 230 ntohl (rrm->is_valid));
231 GNUNET_REVOCATION_revoke_cancel (h); 231 GNUNET_REVOCATION_revoke_cancel (h);
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index c48518f08..30d43e8a1 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -781,7 +781,7 @@ handle_incoming_msg (struct Operation *op,
781 listener = op->listener; 781 listener = op->listener;
782 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 782 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
783 "Received P2P operation request (op %u, port %s) for active listener\n", 783 "Received P2P operation request (op %u, port %s) for active listener\n",
784 ntohl (msg->operation), 784 (uint32_t) ntohl (msg->operation),
785 GNUNET_h2s (&listener->app_id)); 785 GNUNET_h2s (&listener->app_id));
786 incoming_suggest (op, 786 incoming_suggest (op,
787 listener); 787 listener);
@@ -1075,7 +1075,7 @@ handle_client_create_set (void *cls,
1075 1075
1076 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1076 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1077 "Client created new set (operation %u)\n", 1077 "Client created new set (operation %u)\n",
1078 ntohl (msg->operation)); 1078 (uint32_t) ntohl (msg->operation));
1079 if (NULL != set_get (client)) 1079 if (NULL != set_get (client))
1080 { 1080 {
1081 /* There can only be one set per client */ 1081 /* There can only be one set per client */
@@ -1945,7 +1945,7 @@ handle_client_cancel (void *cls,
1945 } 1945 }
1946 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1946 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1947 "Client requested cancel for op %u\n", 1947 "Client requested cancel for op %u\n",
1948 ntohl (msg->request_id)); 1948 (uint32_t) ntohl (msg->request_id));
1949 found = GNUNET_NO; 1949 found = GNUNET_NO;
1950 for (op = set->ops_head; NULL != op; op = op->next) 1950 for (op = set->ops_head; NULL != op; op = op->next)
1951 { 1951 {
@@ -2019,7 +2019,7 @@ handle_client_accept (void *cls,
2019 2019
2020 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2020 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2021 "Client accepting request %u\n", 2021 "Client accepting request %u\n",
2022 ntohl (msg->accept_reject_id)); 2022 (uint32_t) ntohl (msg->accept_reject_id));
2023 GNUNET_assert (GNUNET_YES == op->is_incoming); 2023 GNUNET_assert (GNUNET_YES == op->is_incoming);
2024 op->is_incoming = GNUNET_NO; 2024 op->is_incoming = GNUNET_NO;
2025 GNUNET_CONTAINER_DLL_remove (incoming_head, 2025 GNUNET_CONTAINER_DLL_remove (incoming_head,