aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_common.h15
1 files changed, 12 insertions, 3 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
488GNUNET_log_from_nocheck (enum GNUNET_ErrorType kind, 488GNUNET_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 */
1458int 1460int
1459GNUNET_snprintf (char *buf, size_t size, const char *format, ...); 1461GNUNET_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 */
1471int 1477int
1472GNUNET_asprintf (char **buf, const char *format, ...); 1478GNUNET_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! ************** */