Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From 0145b575ac1fe6a77e00d639864f26fc91ceb12f Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 13 Aug 2022 20:37:03 -0700 |
| 4 | Subject: [PATCH] Fix build with clang-15+ |
| 5 | |
| 6 | Fixes |
| 7 | json_util.c:63:35: error: a function declaration without a prototype is deprecated in all versions of C [-We |
| 8 | rror,-Wstrict-prototypes] |
| 9 | const char *json_util_get_last_err() |
| 10 | ^ |
| 11 | void |
| 12 | |
| 13 | Upstream-Status: Backport [https://github.com/json-c/json-c/pull/783] |
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 15 | --- |
| 16 | json_util.c | 2 +- |
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 18 | |
| 19 | diff --git a/json_util.c b/json_util.c |
| 20 | index 952770a..83d9c68 100644 |
| 21 | --- a/json_util.c |
| 22 | +++ b/json_util.c |
| 23 | @@ -60,7 +60,7 @@ static int _json_object_to_fd(int fd, struct json_object *obj, int flags, const |
| 24 | |
| 25 | static char _last_err[256] = ""; |
| 26 | |
| 27 | -const char *json_util_get_last_err() |
| 28 | +const char *json_util_get_last_err(void) |
| 29 | { |
| 30 | if (_last_err[0] == '\0') |
| 31 | return NULL; |
| 32 | -- |
| 33 | 2.37.2 |
| 34 | |