Selaa lähdekoodia

Fix a few warnings with jansson

jp9000 11 vuotta sitten
vanhempi
sitoutus
fdd5b2b3b6
3 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 1 1
      deps/jansson/src/dump.c
  2. 1 1
      deps/jansson/src/error.c
  3. 2 2
      deps/jansson/src/load.c

+ 1 - 1
deps/jansson/src/dump.c

@@ -230,7 +230,7 @@ static int do_dump(const json_t *json, size_t flags, int depth,
                 goto array_error;
             array->visited = 1;
 
-            n = json_array_size(json);
+            n = (int)json_array_size(json);
 
             if(dump("[", 1, data))
                 goto array_error;

+ 1 - 1
deps/jansson/src/error.c

@@ -56,7 +56,7 @@ void jsonp_error_vset(json_error_t *error, int line, int column,
 
     error->line = line;
     error->column = column;
-    error->position = position;
+    error->position = (int)position;
 
     vsnprintf(error->text, JSON_ERROR_TEXT_LENGTH, msg, ap);
     error->text[JSON_ERROR_TEXT_LENGTH - 1] = '\0';

+ 2 - 2
deps/jansson/src/load.c

@@ -171,7 +171,7 @@ static int stream_get(stream_t *stream, json_error_t *error)
             /* multi-byte UTF-8 sequence */
             int i, count;
 
-            count = utf8_check_first(c);
+            count = (int)utf8_check_first(c);
             if(!count)
                 goto out;
 
@@ -900,7 +900,7 @@ static json_t *parse_json(lex_t *lex, size_t flags, json_error_t *error)
 
     if(error) {
         /* Save the position even though there was no error */
-        error->position = lex->stream.position;
+        error->position = (int)lex->stream.position;
     }
 
     return result;