From 5977ef686a497815108d8637e87a66524416210b Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 00:22:59 -0400 Subject: [PATCH 1/5] Fix documentation issues, -Wdocumentation. --- json_object.h | 12 ++---------- linkhash.h | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/json_object.h b/json_object.h index 4bbc367..bfe6e46 100644 --- a/json_object.h +++ b/json_object.h @@ -329,20 +329,12 @@ JSON_EXPORT void json_object_set_serializer(json_object *jso, /** * Simply call free on the userdata pointer. * Can be used with json_object_set_serializer(). - * - * @param jso unused - * @param userdata the pointer that is passed to free(). */ json_object_delete_fn json_object_free_userdata; /** * Copy the jso->_userdata string over to pb as-is. * Can be used with json_object_set_serializer(). - * - * @param jso The object whose _userdata is used. - * @param pb The destination buffer. - * @param level Ignored. - * @param flags Ignored. */ json_object_to_json_string_fn json_object_userdata_to_json_string; @@ -434,7 +426,7 @@ JSON_EXPORT int json_object_object_add_ex(struct json_object* obj, * @deprecated Please use json_object_object_get_ex */ JSON_EXPORT struct json_object* json_object_object_get(const struct json_object* obj, - const char *key); + const char *key) __deprecated; /** Get the json_object associated with a given object field. * @@ -545,7 +537,7 @@ JSON_EXPORT size_t json_object_array_length(const struct json_object *obj); * Pointers to the json_object pointers will be passed as the two arguments * to @sort_fn * -* @param obj the json_object instance +* @param jso the json_object instance * @param sort_fn a sorting function */ JSON_EXPORT void json_object_array_sort(struct json_object *jso, int(*sort_fn)(const void *, const void *)); diff --git a/linkhash.h b/linkhash.h index a606345..d8c73b8 100644 --- a/linkhash.h +++ b/linkhash.h @@ -308,7 +308,7 @@ extern int lh_table_length(struct lh_table *t); * However, because its interface is public, it will remain part of * the API on the off chance of legacy software using it externally. */ -void lh_abort(const char *msg, ...); +void lh_abort(const char *msg, ...) __deprecated; /** * Resizes the specified table. @@ -340,7 +340,7 @@ static inline unsigned long lh_get_hash(const struct lh_table *t, const void *k) /* Don't use this outside of linkhash.h: */ #ifdef __UNCONST #define _LH_UNCONST(a) __UNCONST(a) -#else +#else #define _LH_UNCONST(a) ((void *)(uintptr_t)(const void *)(a)) #endif From 13ce1bab0ff9e1b3ca399aee65fc959568ac36a5 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 00:23:21 -0400 Subject: [PATCH 2/5] Fix build for platforms that define SIZE_T_MAX. --- arraylist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arraylist.c b/arraylist.c index 8439cc2..ddeb8d4 100644 --- a/arraylist.c +++ b/arraylist.c @@ -22,6 +22,7 @@ # include #endif /* HAVE_STRINGS_H */ +#ifndef SIZE_T_MAX #if SIZEOF_SIZE_T == SIZEOF_INT #define SIZE_T_MAX UINT_MAX #elif SIZEOF_SIZE_T == SIZEOF_LONG @@ -31,6 +32,7 @@ #else #error Unable to determine size of size_t #endif +#endif #include "arraylist.h" From c820d6a81c0f7bd093860e31fd0002e07a65cada Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 00:24:13 -0400 Subject: [PATCH 3/5] INSTALL is an autotools script, rename this file. --- INSTALL => INSTALL.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename INSTALL => INSTALL.md (100%) diff --git a/INSTALL b/INSTALL.md similarity index 100% rename from INSTALL rename to INSTALL.md From 105891a553f5a812a44ef12269ca5c815f74a767 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 11:36:21 -0400 Subject: [PATCH 4/5] Ignore INSTALL --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f0f555e..34c01bd 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,7 @@ /Makefile /Makefile.in /missing +/INSTALL /stamp-h1 /stamp-h2 From f554039946f9036cb200b12fe09105b6db7bcc33 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 13 Aug 2017 16:09:35 -0400 Subject: [PATCH 5/5] Custom platform build output paths. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 34c01bd..63961e9 100644 --- a/.gitignore +++ b/.gitignore @@ -107,3 +107,4 @@ /include /libjson-c.a /libjson-c.so +/libjson-c-*/