Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 116a44fe1 -> 59773301d


Fix a few vararg types


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

Branch: refs/heads/master
Commit: 59773301d926a128689c677e877dd4dcd05bfa33
Parents: 4496520
Author: Nick Wellnhofer <[email protected]>
Authored: Fri Apr 22 13:35:52 2016 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Fri Apr 22 13:36:53 2016 +0200

----------------------------------------------------------------------
 compiler/src/CFCC.c         | 2 +-
 compiler/src/CFCCMan.c      | 2 +-
 compiler/src/CFCGoTypeMap.c | 8 ++++----
 compiler/src/CFCPerl.c      | 7 +++----
 compiler/src/CFCPerlPod.c   | 2 +-
 5 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59773301/compiler/src/CFCC.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCC.c b/compiler/src/CFCC.c
index 6d5adc6..698de51 100644
--- a/compiler/src/CFCC.c
+++ b/compiler/src/CFCC.c
@@ -211,7 +211,7 @@ CFCC_link_text(CFCUri *uri_obj) {
         }
 
         default:
-            CFCUtil_die("Unsupported node type: %d", type);
+            CFCUtil_die("Unsupported node type: %d", (int)type);
             break;
     }
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59773301/compiler/src/CFCCMan.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCCMan.c b/compiler/src/CFCCMan.c
index 732be0f..771d410 100644
--- a/compiler/src/CFCCMan.c
+++ b/compiler/src/CFCCMan.c
@@ -659,7 +659,7 @@ S_nodes_to_man(CFCClass *klass, cmark_node *node, int 
level) {
                 break;
 
             default:
-                CFCUtil_die("Invalid cmark node type: %d", type);
+                CFCUtil_die("Invalid cmark node type: %d", (int)type);
                 break;
         }
     }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59773301/compiler/src/CFCGoTypeMap.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCGoTypeMap.c b/compiler/src/CFCGoTypeMap.c
index 108eb8e..281fb21 100644
--- a/compiler/src/CFCGoTypeMap.c
+++ b/compiler/src/CFCGoTypeMap.c
@@ -200,7 +200,7 @@ CFCGoTypeMap_go_meth_receiever(const char *struct_name,
         max_required = strlen(orig) + 1;
     }
     if (buf_len < max_required) {
-        CFCUtil_die("Buffer length too short: %d", buf_len);
+        CFCUtil_die("Buffer length too short: %d", (int)buf_len);
     }
 
     // Find the first letter of the type and lowercase it.
@@ -239,7 +239,7 @@ CFCGoTypeMap_go_arg_name(CFCParamList *param_list, size_t 
tick, char *buf,
     const char *orig = CFCVariable_get_name(vars[tick]);
     size_t max_required = strlen(orig) + 2;
     if (buf_len < max_required || buf_len < 5) {
-        CFCUtil_die("Buffer length too short: %d", buf_len);
+        CFCUtil_die("Buffer length too short: %d", (int)buf_len);
     }
 
     // If the argument name is a Go keyword, append an underscore.  This is
@@ -256,8 +256,8 @@ CFCGoTypeMap_go_arg_name(CFCParamList *param_list, size_t 
tick, char *buf,
     int last_was_underscore = 0;
     for (size_t i = 0; i <= strlen(orig); i++) {
         if (i > buf_len) {
-            CFCUtil_die("Name too long for buffer of size %d: '%s'", buf_len,
-                        orig);
+            CFCUtil_die("Name too long for buffer of size %d: '%s'",
+                        (int)buf_len, orig);
         }
         if (orig[i] == '_') {
             last_was_underscore = 1;

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59773301/compiler/src/CFCPerl.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerl.c b/compiler/src/CFCPerl.c
index 34bd0cb..5272838 100644
--- a/compiler/src/CFCPerl.c
+++ b/compiler/src/CFCPerl.c
@@ -353,13 +353,12 @@ S_write_boot_c(CFCPerl *self) {
                 = CFCPerlClass_get_class_aliases(class_binding);
             for (size_t j = 0; aliases[j] != NULL; j++) {
                 const char *alias = aliases[j];
-                size_t alias_len  = strlen(alias);
+                int alias_len  = (int)strlen(alias);
                 const char pattern[] =
                     "    cfish_Class_add_alias_to_registry("
-                    "%s, \"%s\", %u);\n";
+                    "%s, \"%s\", %d);\n";
                 char *alias_add
-                    = CFCUtil_sprintf(pattern, class_var, alias,
-                                      (unsigned)alias_len);
+                    = CFCUtil_sprintf(pattern, class_var, alias, alias_len);
                 alias_adds = CFCUtil_cat(alias_adds, alias_add, NULL);
                 FREEMEM(alias_add);
             }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/59773301/compiler/src/CFCPerlPod.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerlPod.c b/compiler/src/CFCPerlPod.c
index bdf4675..f096030 100644
--- a/compiler/src/CFCPerlPod.c
+++ b/compiler/src/CFCPerlPod.c
@@ -823,7 +823,7 @@ S_node_to_pod(cmark_node *node, CFCClass *klass, int 
header_level) {
                 break;
 
             default:
-                CFCUtil_die("Invalid cmark node type: %d", type);
+                CFCUtil_die("Invalid cmark node type: %d", (int)type);
                 break;
         }
     }

Reply via email to