提交 091952ca authored 作者: Jeff Lenk's avatar Jeff Lenk

fix trivial compile errors under windows

上级 3d2b23d6
...@@ -33,8 +33,8 @@ static int cJSON_strcasecmp(const char *s1,const char *s2) ...@@ -33,8 +33,8 @@ static int cJSON_strcasecmp(const char *s1,const char *s2)
return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2); return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);
} }
static void *(*cJSON_malloc)(size_t sz) = malloc; static void *(*cJSON_malloc)(size_t sz);
static void (*cJSON_free)(void *ptr) = free; static void (*cJSON_free)(void *ptr);
static char* cJSON_strdup(const char* str) static char* cJSON_strdup(const char* str)
{ {
...@@ -158,7 +158,7 @@ static const char *parse_string(cJSON *item,const char *str) ...@@ -158,7 +158,7 @@ static const char *parse_string(cJSON *item,const char *str)
switch (len) { switch (len) {
case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
case 1: *--ptr2 =(uc | firstByteMark[len]); case 1: *--ptr2 =(char)(uc | firstByteMark[len]);
} }
ptr2+=len;ptr+=4; ptr2+=len;ptr+=4;
break; break;
......
...@@ -413,7 +413,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat ...@@ -413,7 +413,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
int pindex = -1; int pindex = -1;
char bug_key[256] = ""; char bug_key[256] = "";
int send_ringback = 0; int send_ringback = 0;
uint32_t ring_ready_val = 0; uint8_t ring_ready_val = 0;
oglobals->hups = 0; oglobals->hups = 0;
oglobals->idx = IDX_NADA; oglobals->idx = IDX_NADA;
...@@ -452,7 +452,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat ...@@ -452,7 +452,7 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat
continue; continue;
} }
if ((ring_ready_val = switch_channel_test_flag(originate_status[i].peer_channel, CF_RING_READY))) { if ((ring_ready_val = (uint8_t)switch_channel_test_flag(originate_status[i].peer_channel, CF_RING_READY))) {
if (!originate_status[i].ring_ready) { if (!originate_status[i].ring_ready) {
originate_status[i].ring_ready = ring_ready_val; originate_status[i].ring_ready = ring_ready_val;
} }
......
...@@ -33,8 +33,8 @@ static int cJSON_strcasecmp(const char *s1,const char *s2) ...@@ -33,8 +33,8 @@ static int cJSON_strcasecmp(const char *s1,const char *s2)
return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2); return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2);
} }
static void *(*cJSON_malloc)(size_t sz) = malloc; static void *(*cJSON_malloc)(size_t sz);
static void (*cJSON_free)(void *ptr) = free; static void (*cJSON_free)(void *ptr);
static char* cJSON_strdup(const char* str) static char* cJSON_strdup(const char* str)
{ {
...@@ -158,7 +158,7 @@ static const char *parse_string(cJSON *item,const char *str) ...@@ -158,7 +158,7 @@ static const char *parse_string(cJSON *item,const char *str)
switch (len) { switch (len) {
case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; case 3: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6; case 2: *--ptr2 =((uc | 0x80) & 0xBF); uc >>= 6;
case 1: *--ptr2 =(uc | firstByteMark[len]); case 1: *--ptr2 =(char)(uc | firstByteMark[len]);
} }
ptr2+=len;ptr+=4; ptr2+=len;ptr+=4;
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论