aboutsummaryrefslogtreecommitdiff
path: root/src/regex
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-16 10:54:49 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-10-16 10:54:49 +0200
commit30e8dd5bbe3ee00942e5f9aa303429249c8e9b3d (patch)
tree1cb2bc6072e623f33a103752527e8e000ae776b4 /src/regex
parent09c3455b2c3dd01e52ac2dd9c62c41b3ebcf8028 (diff)
downloadgnunet-30e8dd5bbe3ee00942e5f9aa303429249c8e9b3d.tar.gz
gnunet-30e8dd5bbe3ee00942e5f9aa303429249c8e9b3d.zip
-fix warnings except rps mess
Diffstat (limited to 'src/regex')
-rw-r--r--src/regex/regex_block_lib.c8
-rw-r--r--src/regex/regex_internal_dht.c9
-rw-r--r--src/regex/regex_test_graph.c9
3 files changed, 12 insertions, 14 deletions
diff --git a/src/regex/regex_block_lib.c b/src/regex/regex_block_lib.c
index a309c2305..159e8bf8a 100644
--- a/src/regex/regex_block_lib.c
+++ b/src/regex/regex_block_lib.c
@@ -352,14 +352,14 @@ REGEX_BLOCK_iterate (const struct RegexBlock *block,
352 } 352 }
353 off = len; 353 off = len;
354 LOG (GNUNET_ERROR_TYPE_DEBUG, 354 LOG (GNUNET_ERROR_TYPE_DEBUG,
355 "Start iterating block of size %u, proof %u, off %u edges %u\n", 355 "Start iterating block of size %lu, proof %u, off %lu edges %u\n",
356 size, len, off, n); 356 (unsigned long) size, len, (unsigned long) off, n);
357 /* &aux[off] always points to our token */ 357 /* &aux[off] always points to our token */
358 for (n = 0; n < num_edges; n++) 358 for (n = 0; n < num_edges; n++)
359 { 359 {
360 LOG (GNUNET_ERROR_TYPE_DEBUG, 360 LOG (GNUNET_ERROR_TYPE_DEBUG,
361 "Edge %u/%u, off %u tokenlen %u (%.*s)\n", 361 "Edge %u/%u, off %lu tokenlen %u (%.*s)\n",
362 n + 1, num_edges, off, 362 n + 1, num_edges, (unsigned long) off,
363 ntohs (edges[n].token_length), ntohs (edges[n].token_length), 363 ntohs (edges[n].token_length), ntohs (edges[n].token_length),
364 &aux[off]); 364 &aux[off]);
365 if (NULL != iterator) 365 if (NULL != iterator)
diff --git a/src/regex/regex_internal_dht.c b/src/regex/regex_internal_dht.c
index d2c69f131..39d7cd847 100644
--- a/src/regex/regex_internal_dht.c
+++ b/src/regex/regex_internal_dht.c
@@ -427,8 +427,7 @@ regex_find_path (const struct GNUNET_HashCode *key,
427 427
428 LOG (GNUNET_ERROR_TYPE_DEBUG, 428 LOG (GNUNET_ERROR_TYPE_DEBUG,
429 "Accept state found, now searching for paths to %s\n", 429 "Accept state found, now searching for paths to %s\n",
430 GNUNET_h2s (key), 430 GNUNET_h2s (key));
431 (unsigned int) ctx->position);
432 get_h = GNUNET_DHT_get_start (ctx->info->dht, /* handle */ 431 get_h = GNUNET_DHT_get_start (ctx->info->dht, /* handle */
433 GNUNET_BLOCK_TYPE_REGEX_ACCEPT, /* type */ 432 GNUNET_BLOCK_TYPE_REGEX_ACCEPT, /* type */
434 key, /* key to search */ 433 key, /* key to search */
@@ -534,8 +533,8 @@ regex_result_iterator (void *cls,
534 return GNUNET_YES; // We found an accept state! 533 return GNUNET_YES; // We found an accept state!
535 } 534 }
536 LOG (GNUNET_ERROR_TYPE_DEBUG, 535 LOG (GNUNET_ERROR_TYPE_DEBUG,
537 "* %u, %u, [%u]\n", 536 "* %lu, %lu, [%u]\n",
538 ctx->position, 537 (unsigned long) ctx->position,
539 strlen (ctx->info->description), 538 strlen (ctx->info->description),
540 GNUNET_BLOCK_is_accepting (block, result->size)); 539 GNUNET_BLOCK_is_accepting (block, result->size));
541 regex_next_edge (block, result->size, ctx); 540 regex_next_edge (block, result->size, ctx);
@@ -729,7 +728,7 @@ REGEX_INTERNAL_search (struct GNUNET_DHT_Handle *dht,
729 "Initial key for `%s' is %s (based on `%.*s')\n", 728 "Initial key for `%s' is %s (based on `%.*s')\n",
730 string, 729 string,
731 GNUNET_h2s (&key), 730 GNUNET_h2s (&key),
732 size, 731 (int) size,
733 string); 732 string);
734 ctx = GNUNET_new (struct RegexSearchContext); 733 ctx = GNUNET_new (struct RegexSearchContext);
735 ctx->position = size; 734 ctx->position = size;
diff --git a/src/regex/regex_test_graph.c b/src/regex/regex_test_graph.c
index 8e1e00fd4..c8efae772 100644
--- a/src/regex/regex_test_graph.c
+++ b/src/regex/regex_test_graph.c
@@ -177,8 +177,7 @@ REGEX_TEST_automaton_save_graph_step (void *cls, unsigned int count,
177 } 177 }
178 else 178 else
179 { 179 {
180 GNUNET_asprintf (&s_acc, "\"%s\" [shape=doublecircle];\n", name, 180 GNUNET_asprintf (&s_acc, "\"%s\" [shape=doublecircle];\n", name);
181 s->scc_id);
182 } 181 }
183 } 182 }
184 else if (GNUNET_YES == ctx->coloring) 183 else if (GNUNET_YES == ctx->coloring)
@@ -189,7 +188,7 @@ REGEX_TEST_automaton_save_graph_step (void *cls, unsigned int count,
189 } 188 }
190 else 189 else
191 { 190 {
192 GNUNET_asprintf (&s_acc, "\"%s\" [shape=circle];\n", name, s->scc_id); 191 GNUNET_asprintf (&s_acc, "\"%s\" [shape=circle];\n", name);
193 } 192 }
194 193
195 GNUNET_assert (NULL != s_acc); 194 GNUNET_assert (NULL != s_acc);
@@ -228,7 +227,7 @@ REGEX_TEST_automaton_save_graph_step (void *cls, unsigned int count,
228 else 227 else
229 { 228 {
230 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"ε\"];\n", name, 229 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"ε\"];\n", name,
231 to_name, s->scc_id); 230 to_name);
232 } 231 }
233 } 232 }
234 else 233 else
@@ -242,7 +241,7 @@ REGEX_TEST_automaton_save_graph_step (void *cls, unsigned int count,
242 else 241 else
243 { 242 {
244 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"%s\"];\n", name, 243 GNUNET_asprintf (&s_tran, "\"%s\" -> \"%s\" [label = \"%s\"];\n", name,
245 to_name, ctran->label, s->scc_id); 244 to_name, ctran->label);
246 } 245 }
247 } 246 }
248 247