From: Руслан Ижбулатов Date: Sat, 25 Feb 2017 12:50:24 +0000 (+0000) Subject: W32: cast ntohl() result to uint32_t X-Git-Tag: taler-0.2.1~51 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=31f699c7eeacc991abad778f881f51b0dbdcbc6d;p=oweals%2Fgnunet.git W32: cast ntohl() result to uint32_t W32 version of ntohl() returns u_long. Thank you, Microsoft! --- 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, latency = GNUNET_TIME_absolute_get_duration (send_time); r = ntohl (msg->round_number); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%u <- %u (%u) latency: %s\n", - get_index (peer), get_index (peer->dest), ntohl (msg->counter), + get_index (peer), + get_index (peer->dest), + (uint32_t) ntohl (msg->counter), GNUNET_STRINGS_relative_time_to_string (latency, GNUNET_NO)); /* 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, GCCH_2s (ch), GCP_2s (dest), GNUNET_h2s (port), - ntohl (options), - ntohl (ccn.channel_of_client)); + (uint32_t) ntohl (options), + (uint32_t) ntohl (ccn.channel_of_client)); /* notify local client about incoming connection! */ env = GNUNET_MQ_msg (cm, GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE); @@ -622,7 +622,7 @@ handle_channel_destroy (void *cls, LOG (GNUNET_ERROR_TYPE_DEBUG, "%s tried to destroy unknown channel %X\n", GSC_2s(c), - ntohl (msg->ccn.channel_of_client)); + (uint32_t) ntohl (msg->ccn.channel_of_client)); return; } 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, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Processing PUT request for `%s' of type %u\n", GNUNET_h2s (&dm->key), - ntohl (dm->type)); + (uint32_t) ntohl (dm->type)); rid = ntohl (dm->rid); size = ntohl (dm->size); if (rid > 0) @@ -1012,7 +1012,7 @@ handle_get (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Processing GET request of type %u\n", - ntohl (msg->type)); + (uint32_t) ntohl (msg->type)); GNUNET_STATISTICS_update (stats, gettext_noop ("# GET requests received"), 1, @@ -1043,7 +1043,7 @@ handle_get_key (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Processing GET request for `%s' of type %u\n", GNUNET_h2s (&msg->key), - ntohl (msg->type)); + (uint32_t) ntohl (msg->type)); GNUNET_STATISTICS_update (stats, gettext_noop ("# GET KEY requests received"), 1, @@ -1238,7 +1238,7 @@ handle_remove (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Processing REMOVE request for `%s' of type %u\n", GNUNET_h2s (&dm->key), - ntohl (dm->type)); + (uint32_t) ntohl (dm->type)); plugin->api->get_key (plugin->api->cls, 0, &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, record = PEERSTORE_parse_record_message (srm); GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %d.\n", + "Received a store request. Sub system `%s' Peer `%s Key `%s' Options: %u.\n", record->sub_system, GNUNET_i2s (record->peer), record->key, - ntohl (srm->options)); + (uint32_t) ntohl (srm->options)); record->client = client; if (GNUNET_OK != 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, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Revocation query result: %d\n", - ntohl (qrm->is_valid)); + (uint32_t) ntohl (qrm->is_valid)); q->func (q->func_cls, ntohl (qrm->is_valid)); GNUNET_REVOCATION_query_cancel (q); @@ -225,7 +225,7 @@ handle_revocation_response (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Revocation transmission result: %d\n", - ntohl (rrm->is_valid)); + (uint32_t) ntohl (rrm->is_valid)); h->func (h->func_cls, ntohl (rrm->is_valid)); 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, listener = op->listener; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received P2P operation request (op %u, port %s) for active listener\n", - ntohl (msg->operation), + (uint32_t) ntohl (msg->operation), GNUNET_h2s (&listener->app_id)); incoming_suggest (op, listener); @@ -1075,7 +1075,7 @@ handle_client_create_set (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client created new set (operation %u)\n", - ntohl (msg->operation)); + (uint32_t) ntohl (msg->operation)); if (NULL != set_get (client)) { /* There can only be one set per client */ @@ -1945,7 +1945,7 @@ handle_client_cancel (void *cls, } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client requested cancel for op %u\n", - ntohl (msg->request_id)); + (uint32_t) ntohl (msg->request_id)); found = GNUNET_NO; for (op = set->ops_head; NULL != op; op = op->next) { @@ -2019,7 +2019,7 @@ handle_client_accept (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client accepting request %u\n", - ntohl (msg->accept_reject_id)); + (uint32_t) ntohl (msg->accept_reject_id)); GNUNET_assert (GNUNET_YES == op->is_incoming); op->is_incoming = GNUNET_NO; GNUNET_CONTAINER_DLL_remove (incoming_head,