mirror of
https://github.com/json-c/json-c.git
synced 2026-03-24 15:39:07 +08:00
Missing explicit casts from void* to specific pointers required. Added #define strcasecmp for Visual C++.
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "json.h"
|
||||
#include "parse_flags.h"
|
||||
|
||||
#if !defined(HAVE_STRCASECMP) && defined(_MSC_VER)
|
||||
# define strcasecmp _stricmp
|
||||
#elif !defined(HAVE_STRCASECMP)
|
||||
# error You do not have strcasecmp on your system.
|
||||
#endif /* HAVE_STRNCASECMP */
|
||||
|
||||
static struct {
|
||||
const char *arg;
|
||||
int flag;
|
||||
|
||||
@@ -12,8 +12,8 @@ static int sort_fn (const void *j1, const void *j2)
|
||||
json_object * const *jso1, * const *jso2;
|
||||
int i1, i2;
|
||||
|
||||
jso1 = j1;
|
||||
jso2 = j2;
|
||||
jso1 = (json_object* const*)j1;
|
||||
jso2 = (json_object* const*)j2;
|
||||
if (!*jso1 && !*jso2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user