lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [11/14] lucy-clownfish git commit: Fix conv warnings in CFC test suite.
Date Sun, 20 Mar 2016 05:54:05 GMT
Fix conv warnings in CFC test suite.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/9b7678b1
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/9b7678b1
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/9b7678b1

Branch: refs/heads/master
Commit: 9b7678b10f06f4ebe320ca8a14012d2291554e0c
Parents: 9d3aef8
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Sat Mar 19 22:31:29 2016 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Sat Mar 19 22:34:21 2016 -0700

----------------------------------------------------------------------
 compiler/src/CFCTestParamList.c | 4 ++--
 compiler/src/CFCTestParser.c    | 6 +++---
 compiler/src/CFCTestUtil.c      | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/9b7678b1/compiler/src/CFCTestParamList.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestParamList.c b/compiler/src/CFCTestParamList.c
index 9dab0b8..5a375af 100644
--- a/compiler/src/CFCTestParamList.c
+++ b/compiler/src/CFCTestParamList.c
@@ -60,7 +60,7 @@ S_run_tests(CFCTest *test) {
         OK(test, CFCParamList_variadic(param_list), "variadic");
         STR_EQ(test, CFCParamList_to_c(param_list),
                "neato_Obj* self, int num, ...", "to_c");
-        INT_EQ(test, CFCParamList_num_vars(param_list), 2, "num_vars");
+        UINT_EQ(test, CFCParamList_num_vars(param_list), 2, "num_vars");
         const char **initial_values
             = CFCParamList_get_initial_values(param_list);
         STR_EQ(test, initial_values[0], "NULL", "initial_values[0]"); 
@@ -78,7 +78,7 @@ S_run_tests(CFCTest *test) {
             = CFCTest_parse_param_list(test, parser, "()");
         CFCParamList_resolve_types(param_list);
         STR_EQ(test, CFCParamList_to_c(param_list), "void", "to_c");
-        INT_EQ(test, CFCParamList_num_vars(param_list), 0, "num_vars");
+        UINT_EQ(test, CFCParamList_num_vars(param_list), 0, "num_vars");
         CFCVariable **variables = CFCParamList_get_variables(param_list);
         OK(test, variables[0] == NULL, "get_variables");
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/9b7678b1/compiler/src/CFCTestParser.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestParser.c b/compiler/src/CFCTestParser.c
index 057d5d9..2219dba 100644
--- a/compiler/src/CFCTestParser.c
+++ b/compiler/src/CFCTestParser.c
@@ -228,12 +228,12 @@ S_run_tests(CFCTest *test) {
             "(int foo)",
             "(Obj *foo, Foo **foo_ptr)"
         };
-        for (int i = 0; i < 3; ++i) {
+        for (size_t i = 0; i < 3; ++i) {
             const char *param_list_string = param_list_strings[i];
             CFCParamList *param_list
                 = CFCTest_parse_param_list(test, parser, param_list_string);
-            INT_EQ(test, CFCParamList_num_vars(param_list), i,
-                   "param list num_vars: %d", i);
+            UINT_EQ(test, CFCParamList_num_vars(param_list), i,
+                    "param list num_vars: %u", (unsigned)i);
             CFCBase_decref((CFCBase*)param_list);
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/9b7678b1/compiler/src/CFCTestUtil.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCTestUtil.c b/compiler/src/CFCTestUtil.c
index fd431e3..77e7c7b 100644
--- a/compiler/src/CFCTestUtil.c
+++ b/compiler/src/CFCTestUtil.c
@@ -76,7 +76,7 @@ S_run_file_tests(CFCTest *test) {
         OK(test, file != NULL, "can open file");
         char buf[10];
         size_t chars_read = fread(buf, 1, 10, file);
-        INT_EQ(test, chars_read, 3, "read correct number of chars");
+        UINT_EQ(test, chars_read, 3, "read correct number of chars");
         OK(test, memcmp(buf, "foo", 3) == 0, "read correct string");
 
         long file_length = CFCUtil_flength(file);
@@ -88,7 +88,7 @@ S_run_file_tests(CFCTest *test) {
     {
         size_t content_len;
         char *content = CFCUtil_slurp_text(foo_txt, &content_len);
-        INT_EQ(test, content_len, 3, "slurp_text len");
+        UINT_EQ(test, content_len, 3, "slurp_text len");
         OK(test, memcmp(content, "foo", 3) == 0, "slurp_text content");
         FREEMEM(content);
     }


Mime
View raw message