summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ats-tool/gnunet-ats.c8
-rw-r--r--src/ats/gnunet-ats-solver-eval.c10
-rw-r--r--src/datastore/plugin_datastore_sqlite.c5
-rw-r--r--src/transport/gnunet-transport.c8
4 files changed, 18 insertions, 13 deletions
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 5cb52d177..767473141 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -355,17 +355,17 @@ transport_addr_to_str_cb (void *cls,
{
case GNUNET_SYSERR:
FPRINTF (stderr,
- "Failed to convert address for peer `%s' plugin `%s' length %lu to string (communication error)\n",
+ "Failed to convert address for peer `%s' plugin `%s' length %u to string (communication error)\n",
GNUNET_i2s (&pr->address->peer),
pr->address->transport_name,
- pr->address->address_length);
+ (unsigned int) pr->address->address_length);
return;
case GNUNET_NO:
FPRINTF (stderr,
- "Failed to convert address for peer `%s' plugin `%s' length %lu to string (address invalid or not supported)\n",
+ "Failed to convert address for peer `%s' plugin `%s' length %u to string (address invalid or not supported)\n",
GNUNET_i2s (&pr->address->peer),
pr->address->transport_name,
- pr->address->address_length);
+ (unsigned int) pr->address->address_length);
return;
case GNUNET_OK:
/* continues below */
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c
index fbcd14a9c..17bdf6b15 100644
--- a/src/ats/gnunet-ats-solver-eval.c
+++ b/src/ats/gnunet-ats-solver-eval.c
@@ -818,10 +818,10 @@ GNUNET_ATS_solver_generate_property_stop_all ()
/**
* Preference Generators
*/
-
static struct PreferenceGenerator *pref_gen_head;
static struct PreferenceGenerator *pref_gen_tail;
+
static double
get_preference (struct PreferenceGenerator *pg)
{
@@ -902,7 +902,8 @@ set_feedback_task (void *cls,
return;
}
- switch (pg->kind) {
+ switch (pg->kind)
+ {
case GNUNET_ATS_PREFERENCE_BANDWIDTH:
dur = GNUNET_TIME_absolute_get_duration(pg->feedback_last_bw_update);
bw_acc_in = dur.rel_value_us *pg->last_assigned_bw_in + pg->feedback_bw_in_acc;
@@ -925,6 +926,8 @@ set_feedback_task (void *cls,
break;
default:
+ GNUNET_break (0);
+ feedback = 0.0;
break;
}
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
@@ -950,9 +953,10 @@ set_feedback_task (void *cls,
&set_feedback_task, pg);
}
+
static void
set_pref_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct PreferenceGenerator *pg = cls;
struct TestPeer *p;
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 5ece7cd17..ae57c6aa0 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -496,8 +496,9 @@ sqlite_plugin_put (void *cls,
return GNUNET_SYSERR;
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "sqlite",
"Storing in database block with type %u/key `%s'/priority %u/expiration in %s (%s).\n",
- type, GNUNET_h2s (key), priority,
- (unsigned long long)
+ type,
+ GNUNET_h2s (key),
+ priority,
GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (expiration),
GNUNET_YES),
GNUNET_STRINGS_absolute_time_to_string (expiration));
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 646b8087b..7adbf4c32 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -799,10 +799,10 @@ process_validation_string (void *cls,
if (GNUNET_SYSERR == res)
{
FPRINTF (stderr,
- "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n",
+ "Failed to convert address for peer `%s' plugin `%s' length %u to string \n",
GNUNET_i2s (&vc->id),
vc->addrcp->transport_name,
- vc->addrcp->address_length);
+ (unsigned int) vc->addrcp->address_length);
}
if (GNUNET_TIME_UNIT_ZERO_ABS.abs_value_us == vc->valid_until.abs_value_us)
s_valid = GNUNET_strdup ("never");
@@ -1368,10 +1368,10 @@ process_peer_string (void *cls,
if (GNUNET_SYSERR == res)
{
FPRINTF (stderr,
- "Failed to convert address for peer `%s' plugin `%s' length %lu to string \n",
+ "Failed to convert address for peer `%s' plugin `%s' length %u to string \n",
GNUNET_i2s (&rc->id),
rc->addrcp->transport_name,
- rc->addrcp->address_length);
+ (unsigned int) rc->addrcp->address_length);
print_info (&rc->id,
rc->transport,
NULL,