diff options
-rw-r--r-- | src/include/gnunet_common.h | 15 | ||||
-rw-r--r-- | src/util/client.c | 2 | ||||
-rw-r--r-- | src/util/service.c | 4 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index fcaae1026..21b87b0f5 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -488,7 +488,8 @@ void | |||
488 | GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, | 488 | GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, |
489 | const char *comp, | 489 | const char *comp, |
490 | const char *message, | 490 | const char *message, |
491 | ...); | 491 | ...) |
492 | __attribute__ ((format (printf, 3, 4))); | ||
492 | 493 | ||
493 | #if ! defined(GNUNET_CULL_LOGGING) | 494 | #if ! defined(GNUNET_CULL_LOGGING) |
494 | #define GNUNET_log_from(kind, comp, ...) \ | 495 | #define GNUNET_log_from(kind, comp, ...) \ |
@@ -1445,6 +1446,7 @@ GNUNET_is_zero_ (const void *a, | |||
1445 | memcpy (&(arr1) [(len1) - (len2)], _a2, (len2) * sizeof (*arr1)); \ | 1446 | memcpy (&(arr1) [(len1) - (len2)], _a2, (len2) * sizeof (*arr1)); \ |
1446 | } while (0) | 1447 | } while (0) |
1447 | 1448 | ||
1449 | |||
1448 | /** | 1450 | /** |
1449 | * @ingroup memory | 1451 | * @ingroup memory |
1450 | * Like snprintf, just aborts if the buffer is of insufficient size. | 1452 | * Like snprintf, just aborts if the buffer is of insufficient size. |
@@ -1456,7 +1458,11 @@ GNUNET_is_zero_ (const void *a, | |||
1456 | * @return number of bytes written to buf or negative value on error | 1458 | * @return number of bytes written to buf or negative value on error |
1457 | */ | 1459 | */ |
1458 | int | 1460 | int |
1459 | GNUNET_snprintf (char *buf, size_t size, const char *format, ...); | 1461 | GNUNET_snprintf (char *buf, |
1462 | size_t size, | ||
1463 | const char *format, | ||
1464 | ...) | ||
1465 | __attribute__ ((format (printf, 3, 4))); | ||
1460 | 1466 | ||
1461 | 1467 | ||
1462 | /** | 1468 | /** |
@@ -1469,7 +1475,10 @@ GNUNET_snprintf (char *buf, size_t size, const char *format, ...); | |||
1469 | * @return number of bytes in "*buf" excluding 0-termination | 1475 | * @return number of bytes in "*buf" excluding 0-termination |
1470 | */ | 1476 | */ |
1471 | int | 1477 | int |
1472 | GNUNET_asprintf (char **buf, const char *format, ...); | 1478 | GNUNET_asprintf (char **buf, |
1479 | const char *format, | ||
1480 | ...) | ||
1481 | __attribute__ ((format (printf, 2, 3))); | ||
1473 | 1482 | ||
1474 | 1483 | ||
1475 | /* ************** internal implementations, use macros above! ************** */ | 1484 | /* ************** internal implementations, use macros above! ************** */ |
diff --git a/src/util/client.c b/src/util/client.c index 86dabe664..2df439175 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -654,7 +654,7 @@ try_connect_using_address (void *cls, | |||
654 | "Trying to connect using address `%s:%u'\n", | 654 | "Trying to connect using address `%s:%u'\n", |
655 | GNUNET_a2s (addr, | 655 | GNUNET_a2s (addr, |
656 | addrlen), | 656 | addrlen), |
657 | cstate->port); | 657 | (unsigned int) cstate->port); |
658 | ap = GNUNET_malloc (sizeof(struct AddressProbe) + addrlen); | 658 | ap = GNUNET_malloc (sizeof(struct AddressProbe) + addrlen); |
659 | ap->addr = (const struct sockaddr *) &ap[1]; | 659 | ap->addr = (const struct sockaddr *) &ap[1]; |
660 | GNUNET_memcpy (&ap[1], | 660 | GNUNET_memcpy (&ap[1], |
diff --git a/src/util/service.c b/src/util/service.c index ddd31181d..4c647430d 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -2120,7 +2120,9 @@ GNUNET_SERVICE_run_ (int argc, | |||
2120 | { | 2120 | { |
2121 | clock_offset = skew_offset - skew_variance; | 2121 | clock_offset = skew_offset - skew_variance; |
2122 | GNUNET_TIME_set_offset (clock_offset); | 2122 | GNUNET_TIME_set_offset (clock_offset); |
2123 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Skewing clock by %dll ms\n", clock_offset); | 2123 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
2124 | "Skewing clock by %lld ms\n", | ||
2125 | (long long) clock_offset); | ||
2124 | } | 2126 | } |
2125 | GNUNET_RESOLVER_connect (sh.cfg); | 2127 | GNUNET_RESOLVER_connect (sh.cfg); |
2126 | 2128 | ||