aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-06 15:20:10 +0000
committerChristian Grothoff <christian@grothoff.org>2016-05-06 15:20:10 +0000
commit8e325aefdaab6aae4567762bd639dfa1db3c4f15 (patch)
treee18e0515ffab51e8871dbf371750b21382691bdc /src/statistics
parent221996eb735384bb5478819e4358d2c648a16d7b (diff)
downloadgnunet-8e325aefdaab6aae4567762bd639dfa1db3c4f15.tar.gz
gnunet-8e325aefdaab6aae4567762bd639dfa1db3c4f15.zip
fix compiler warnings
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/test_statistics_api_watch_zero_value.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/statistics/test_statistics_api_watch_zero_value.c b/src/statistics/test_statistics_api_watch_zero_value.c
index 8bf656ed0..fd0c0410b 100644
--- a/src/statistics/test_statistics_api_watch_zero_value.c
+++ b/src/statistics/test_statistics_api_watch_zero_value.c
@@ -58,8 +58,11 @@ static int
58watch_1 (void *cls, const char *subsystem, const char *name, uint64_t value, 58watch_1 (void *cls, const char *subsystem, const char *name, uint64_t value,
59 int is_persistent) 59 int is_persistent)
60{ 60{
61 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received value `%s' `%s' %llu\n", 61 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
62 subsystem, name, value); 62 "Received value `%s' `%s' %llu\n",
63 subsystem,
64 name,
65 (unsigned long long) value);
63 GNUNET_assert (0 == strcmp (name, "test-1")); 66 GNUNET_assert (0 == strcmp (name, "test-1"));
64 if ((0 == value) && (3 == ok)) 67 if ((0 == value) && (3 == ok))
65 { 68 {
@@ -88,11 +91,17 @@ watch_1 (void *cls, const char *subsystem, const char *name, uint64_t value,
88 91
89 92
90static int 93static int
91watch_2 (void *cls, const char *subsystem, const char *name, uint64_t value, 94watch_2 (void *cls,
95 const char *subsystem,
96 const char *name,
97 uint64_t value,
92 int is_persistent) 98 int is_persistent)
93{ 99{
94 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received value `%s' `%s' %llu\n", 100 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
95 subsystem, name, value); 101 "Received value `%s' `%s' %llu\n",
102 subsystem,
103 name,
104 (unsigned long long) value);
96 105
97 GNUNET_assert (0 == strcmp (name, "test-2")); 106 GNUNET_assert (0 == strcmp (name, "test-2"));
98 if ((42 == value) && (1 == ok2)) 107 if ((42 == value) && (1 == ok2))
@@ -106,7 +115,9 @@ watch_2 (void *cls, const char *subsystem, const char *name, uint64_t value,
106 } 115 }
107 else 116 else
108 { 117 {
109 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Received unexpected value %llu\n", value); 118 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
119 "Received unexpected value %llu\n",
120 (unsigned long long) value);
110 121
111 GNUNET_break (0); 122 GNUNET_break (0);
112 GNUNET_SCHEDULER_cancel (shutdown_task); 123 GNUNET_SCHEDULER_cancel (shutdown_task);
@@ -136,7 +147,8 @@ run (void *cls, char *const *args, const char *cfgfile,
136 GNUNET_STATISTICS_set (h2, "test-2", 42, GNUNET_NO); 147 GNUNET_STATISTICS_set (h2, "test-2", 42, GNUNET_NO);
137 148
138 shutdown_task = 149 shutdown_task =
139 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &force_shutdown, 150 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
151 &force_shutdown,
140 NULL); 152 NULL);
141} 153}
142 154