aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-07-22 15:44:47 -0700
committerJason Evans <jasone@canonware.com>2015-07-22 15:44:47 -0700
commite42c309eba6c5084dc0abda9b211e91e2c548fdf (patch)
treecb8ecc714c61194b7fd6b90b7d62592e25833548 /src
parent1b0e4abbfdbcc1c1a71d1f617adb19951109bfce (diff)
downloadjemalloc-e42c309eba6c5084dc0abda9b211e91e2c548fdf.tar.gz
Add JEMALLOC_FORMAT_PRINTF().
Replace JEMALLOC_ATTR(format(printf, ...). with JEMALLOC_FORMAT_PRINTF(), so that configuration feature tests can omit the attribute if it would cause extraneous compilation warnings.
Diffstat (limited to 'src')
-rw-r--r--src/prof.c4
-rw-r--r--src/util.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/prof.c b/src/prof.c
index b24996a..babdbd6 100644
--- a/src/prof.c
+++ b/src/prof.c
@@ -1007,7 +1007,7 @@ prof_dump_write(bool propagate_err, const char *s)
return (false);
}
-JEMALLOC_ATTR(format(printf, 2, 3))
+JEMALLOC_FORMAT_PRINTF(2, 3)
static bool
prof_dump_printf(bool propagate_err, const char *format, ...)
{
@@ -1338,7 +1338,7 @@ label_return:
return (ret);
}
-JEMALLOC_ATTR(format(printf, 1, 2))
+JEMALLOC_FORMAT_PRINTF(1, 2)
static int
prof_open_maps(const char *format, ...)
{
diff --git a/src/util.c b/src/util.c
index a6ef5d5..4cb0d6c 100644
--- a/src/util.c
+++ b/src/util.c
@@ -586,7 +586,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
return (ret);
}
-JEMALLOC_ATTR(format(printf, 3, 4))
+JEMALLOC_FORMAT_PRINTF(3, 4)
int
malloc_snprintf(char *str, size_t size, const char *format, ...)
{
@@ -625,7 +625,7 @@ malloc_vcprintf(void (*write_cb)(void *, const char *), void *cbopaque,
* Print to a callback function in such a way as to (hopefully) avoid memory
* allocation.
*/
-JEMALLOC_ATTR(format(printf, 3, 4))
+JEMALLOC_FORMAT_PRINTF(3, 4)
void
malloc_cprintf(void (*write_cb)(void *, const char *), void *cbopaque,
const char *format, ...)
@@ -638,7 +638,7 @@ malloc_cprintf(void (*write_cb)(void *, const char *), void *cbopaque,
}
/* Print to stderr in such a way as to avoid memory allocation. */
-JEMALLOC_ATTR(format(printf, 1, 2))
+JEMALLOC_FORMAT_PRINTF(1, 2)
void
malloc_printf(const char *format, ...)
{