diff --git a/lib/misc/lejp.c b/lib/misc/lejp.c index 50ff4b5a..5407c90f 100644 --- a/lib/misc/lejp.c +++ b/lib/misc/lejp.c @@ -25,7 +25,7 @@ void lejp_construct(struct lejp_ctx *ctx, - char (*callback)(struct lejp_ctx *ctx, char reason), void *user, + signed char (*callback)(struct lejp_ctx *ctx, char reason), void *user, const char * const *paths, unsigned char count_paths) { ctx->st[0].s = 0; @@ -86,7 +86,7 @@ lejp_destruct(struct lejp_ctx *ctx) void lejp_change_callback(struct lejp_ctx *ctx, - char (*callback)(struct lejp_ctx *ctx, char reason)) + signed char (*callback)(struct lejp_ctx *ctx, char reason)) { ctx->callback(ctx, LEJPCB_DESTRUCTED); ctx->callback = callback; diff --git a/lib/misc/lejp.h b/lib/misc/lejp.h index 7bf7ba7f..0b37bb3e 100644 --- a/lib/misc/lejp.h +++ b/lib/misc/lejp.h @@ -140,9 +140,9 @@ enum lejp_callbacks { * * LEJPCB_OBJECT_END: An object ended */ -LWS_EXTERN char _lejp_callback(struct lejp_ctx *ctx, char reason); +LWS_EXTERN signed char _lejp_callback(struct lejp_ctx *ctx, char reason); -typedef char (*lejp_callback)(struct lejp_ctx *ctx, char reason); +typedef signed char (*lejp_callback)(struct lejp_ctx *ctx, char reason); #ifndef LEJP_MAX_DEPTH #define LEJP_MAX_DEPTH 12 @@ -179,7 +179,7 @@ struct lejp_ctx { * pointers */ - char (*callback)(struct lejp_ctx *ctx, char reason); + signed char (*callback)(struct lejp_ctx *ctx, char reason); void *user; const char * const *paths; @@ -215,8 +215,8 @@ struct lejp_ctx { LWS_VISIBLE LWS_EXTERN void lejp_construct(struct lejp_ctx *ctx, - char (*callback)(struct lejp_ctx *ctx, char reason), void *user, - const char * const *paths, unsigned char paths_count); + signed char (*callback)(struct lejp_ctx *ctx, char reason), + void *user, const char * const *paths, unsigned char paths_count); LWS_VISIBLE LWS_EXTERN void lejp_destruct(struct lejp_ctx *ctx); @@ -226,7 +226,7 @@ lejp_parse(struct lejp_ctx *ctx, const unsigned char *json, int len); LWS_VISIBLE LWS_EXTERN void lejp_change_callback(struct lejp_ctx *ctx, - char (*callback)(struct lejp_ctx *ctx, char reason)); + signed char (*callback)(struct lejp_ctx *ctx, char reason)); LWS_VISIBLE LWS_EXTERN int lejp_get_wildcard(struct lejp_ctx *ctx, int wildcard, char *dest, int len); diff --git a/lib/server/lejp-conf.c b/lib/server/lejp-conf.c index 565e2da9..f4b894de 100644 --- a/lib/server/lejp-conf.c +++ b/lib/server/lejp-conf.c @@ -223,7 +223,7 @@ arg_to_bool(const char *s) return 0; } -static char +static signed char lejp_globals_cb(struct lejp_ctx *ctx, char reason) { struct jpargs *a = (struct jpargs *)ctx->user; @@ -296,7 +296,7 @@ dostring: return 0; } -static char +static signed char lejp_vhosts_cb(struct lejp_ctx *ctx, char reason) { struct jpargs *a = (struct jpargs *)ctx->user;