diff options
Diffstat (limited to 'tools/bpf/bpftool/json_writer.c')
-rw-r--r-- | tools/bpf/bpftool/json_writer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/json_writer.c b/tools/bpf/bpftool/json_writer.c index a07d17918725..bff7ee026680 100644 --- a/tools/bpf/bpftool/json_writer.c +++ b/tools/bpf/bpftool/json_writer.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <malloc.h> | 20 | #include <malloc.h> |
21 | #include <inttypes.h> | 21 | #include <inttypes.h> |
22 | #include <stdint.h> | 22 | #include <stdint.h> |
23 | #include <linux/compiler.h> | ||
23 | 24 | ||
24 | #include "json_writer.h" | 25 | #include "json_writer.h" |
25 | 26 | ||
@@ -157,7 +158,8 @@ void jsonw_name(json_writer_t *self, const char *name) | |||
157 | putc(' ', self->out); | 158 | putc(' ', self->out); |
158 | } | 159 | } |
159 | 160 | ||
160 | void jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) | 161 | void __printf(2, 0) |
162 | jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) | ||
161 | { | 163 | { |
162 | jsonw_eor(self); | 164 | jsonw_eor(self); |
163 | putc('"', self->out); | 165 | putc('"', self->out); |
@@ -165,7 +167,7 @@ void jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap) | |||
165 | putc('"', self->out); | 167 | putc('"', self->out); |
166 | } | 168 | } |
167 | 169 | ||
168 | void jsonw_printf(json_writer_t *self, const char *fmt, ...) | 170 | void __printf(2, 3) jsonw_printf(json_writer_t *self, const char *fmt, ...) |
169 | { | 171 | { |
170 | va_list ap; | 172 | va_list ap; |
171 | 173 | ||