Selaa lähdekoodia

Fix signed/unsigned warning in unit test

bel 9 vuotta sitten
vanhempi
commit
f1ba9d27c0
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      test/public_server.c

+ 2 - 1
test/public_server.c

@@ -863,7 +863,8 @@ START_TEST(test_request_handlers)
 	ck_assert(ri != NULL);
 	ck_assert_str_eq(ri->uri, "200");
 	i = mg_read(client_conn, buf, sizeof(buf));
-	ck_assert(i < sizeof(buf));
+	ck_assert((int)i < (int)sizeof(buf));
+    ck_assert(i > 0);
 	ck_assert_int_eq(i, (int)strlen(expected));
 	buf[i] = 0;
 	ck_assert_str_eq(buf, expected);