diff options
Diffstat (limited to 'tools/bpf/bpftool/json_writer.h')
-rw-r--r-- | tools/bpf/bpftool/json_writer.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/json_writer.h b/tools/bpf/bpftool/json_writer.h index cb9a1993681c..35cf1f00f96c 100644 --- a/tools/bpf/bpftool/json_writer.h +++ b/tools/bpf/bpftool/json_writer.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <stdbool.h> | 14 | #include <stdbool.h> |
15 | #include <stdint.h> | 15 | #include <stdint.h> |
16 | #include <stdarg.h> | 16 | #include <stdarg.h> |
17 | #include <linux/compiler.h> | ||
17 | 18 | ||
18 | /* Opaque class structure */ | 19 | /* Opaque class structure */ |
19 | typedef struct json_writer json_writer_t; | 20 | typedef struct json_writer json_writer_t; |
@@ -30,8 +31,9 @@ void jsonw_pretty(json_writer_t *self, bool on); | |||
30 | void jsonw_name(json_writer_t *self, const char *name); | 31 | void jsonw_name(json_writer_t *self, const char *name); |
31 | 32 | ||
32 | /* Add value */ | 33 | /* Add value */ |
33 | void jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, va_list ap); | 34 | void __printf(2, 0) jsonw_vprintf_enquote(json_writer_t *self, const char *fmt, |
34 | void jsonw_printf(json_writer_t *self, const char *fmt, ...); | 35 | va_list ap); |
36 | void __printf(2, 3) jsonw_printf(json_writer_t *self, const char *fmt, ...); | ||
35 | void jsonw_string(json_writer_t *self, const char *value); | 37 | void jsonw_string(json_writer_t *self, const char *value); |
36 | void jsonw_bool(json_writer_t *self, bool value); | 38 | void jsonw_bool(json_writer_t *self, bool value); |
37 | void jsonw_float(json_writer_t *self, double number); | 39 | void jsonw_float(json_writer_t *self, double number); |