Răsfoiți Sursa

Squash warnings in frozen build

PUBLISHED_FROM=956e515a782c80101b19c28fe619729e388312e4
Sergey Lyubka 9 ani în urmă
părinte
comite
9e48add623
2 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 1 1
      frozen.h
  2. 2 2
      unit_test.c

+ 1 - 1
frozen.h

@@ -41,7 +41,7 @@ enum json_token_type {
   JSON_TYPE_ARRAY_START,
   JSON_TYPE_ARRAY_END,
 
-  JSON_TYPES_CNT,
+  JSON_TYPES_CNT
 };
 
 /*

+ 2 - 2
unit_test.c

@@ -313,11 +313,11 @@ static void cb(void *data,
   const char *snull = "<null>";
 
   sprintf(buf + strlen(buf), "name:'%.*s', path:'%s', type:%s, val:'%.*s'\n",
-      name != NULL ? name_len : strlen(snull),
+      (int) (name != NULL ? name_len : strlen(snull)),
       name != NULL ? name : snull,
       path,
       tok_type_names[token->type],
-      token->ptr != NULL ? token->len : strlen(snull),
+      (int) (token->ptr != NULL ? token->len : strlen(snull)),
       token->ptr != NULL ? token->ptr : snull
       );
 }