Fixed warnings and error resulting in printing string without comments (old debug statement).

pull/12/head
Krzysztof Gabis 11 years ago
parent d901014d55
commit 08a4396b32
  1. 4
      parson.c

@ -170,7 +170,8 @@ static char * read_file(const char * filename) {
}
static void remove_comments(char *string, const char *start_token, const char *end_token) {
int in_string = 0, escaped = 0, i;
int in_string = 0, escaped = 0;
size_t i;
char *ptr = NULL, current_char;
size_t start_token_len = strlen(start_token);
size_t end_token_len = strlen(end_token);
@ -630,7 +631,6 @@ JSON_Value * json_parse_string_with_comments(const char *string) {
return NULL;
remove_comments(string_mutable_copy, "/*", "*/");
remove_comments(string_mutable_copy, "//", "\n");
puts(string_mutable_copy);
string_mutable_copy_ptr = string_mutable_copy;
skip_whitespaces(&string_mutable_copy_ptr);
if (*string_mutable_copy_ptr != '{' && *string_mutable_copy_ptr != '[') {

Loading…
Cancel
Save