*: Remove useless asserts

This commit is contained in:
ZyX
2017-04-08 20:22:46 +03:00
parent 467a02f88d
commit 7701014b65
3 changed files with 0 additions and 4 deletions

View File

@@ -609,7 +609,6 @@ int json_decode_string(const char *const buf, const size_t buf_len,
EMSG(_("E474: Attempt to decode a blank string")); EMSG(_("E474: Attempt to decode a blank string"));
return FAIL; return FAIL;
} }
assert(STRCMP(p_enc, "utf-8") == 0);
int ret = OK; int ret = OK;
ValuesStack stack = KV_INITIAL_VALUE; ValuesStack stack = KV_INITIAL_VALUE;
ContainerStack container_stack = KV_INITIAL_VALUE; ContainerStack container_stack = KV_INITIAL_VALUE;

View File

@@ -564,7 +564,6 @@ static inline int convert_to_json_string(garray_T *const gap,
} else { } else {
size_t utf_len = len; size_t utf_len = len;
char *tofree = NULL; char *tofree = NULL;
assert(STRCMP(p_enc, "utf-8") == 0);
size_t str_len = 0; size_t str_len = 0;
// Encode character as \uNNNN if // Encode character as \uNNNN if
// 1. It is an ASCII control character (0x0 .. 0x1F; 0x7F not // 1. It is an ASCII control character (0x0 .. 0x1F; 0x7F not

View File

@@ -2920,8 +2920,6 @@ shada_write_file_nomerge: {}
verbose_leave(); verbose_leave();
} }
assert(STRCMP(p_enc, "utf-8") == 0);
const ShaDaWriteResult sw_ret = shada_write(&sd_writer, (nomerge const ShaDaWriteResult sw_ret = shada_write(&sd_writer, (nomerge
? NULL ? NULL
: &sd_reader)); : &sd_reader));