You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/11/26 22:35:22 UTC

[lucy-commits] svn commit: r1206607 - in /incubator/lucy/trunk/clownfish: lib/Clownfish.xs src/CFCClass.c src/CFCFile.c src/CFCPerlConstructor.c

Author: marvin
Date: Sat Nov 26 21:35:21 2011
New Revision: 1206607

URL: http://svn.apache.org/viewvc?rev=1206607&view=rev
Log:
Fix some format argument vars and remove an unused var.

Modified:
    incubator/lucy/trunk/clownfish/lib/Clownfish.xs
    incubator/lucy/trunk/clownfish/src/CFCClass.c
    incubator/lucy/trunk/clownfish/src/CFCFile.c
    incubator/lucy/trunk/clownfish/src/CFCPerlConstructor.c

Modified: incubator/lucy/trunk/clownfish/lib/Clownfish.xs
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/lib/Clownfish.xs?rev=1206607&r1=1206606&r2=1206607&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/lib/Clownfish.xs (original)
+++ incubator/lucy/trunk/clownfish/lib/Clownfish.xs Sat Nov 26 21:35:21 2011
@@ -38,7 +38,7 @@
     switch (ix) {
 
 #define END_SET_OR_GET_SWITCH \
-        default: croak("Internal error. ix: %d", ix); \
+        default: croak("Internal error. ix: %d", (int)ix); \
     } \
     if (ix % 2 == 0) { \
         XPUSHs(sv_2mortal(retval)); \
@@ -627,7 +627,7 @@ CODE:
             CFCFile_cfh_path(self, buf, buf_size, base_dir);
             break;
         default:
-            croak("unexpected ix value: %d", ix);
+            croak("unexpected ix value: %d", (int)ix);
     }
     SvCUR_set(RETVAL, strlen(buf));
 }
@@ -867,7 +867,7 @@ CODE:
         case 3:
             size = CFCMethod_full_offset_sym(self, invoker, NULL, 0);
             break;
-        default: croak("Unexpected ix: %d", ix);
+        default: croak("Unexpected ix: %d", (int)ix);
     }
     RETVAL = newSV(size);
     SvPOK_on(RETVAL);
@@ -882,7 +882,7 @@ CODE:
         case 3:
             CFCMethod_full_offset_sym(self, invoker, buf, size);
             break;
-        default: croak("Unexpected ix: %d", ix);
+        default: croak("Unexpected ix: %d", (int)ix);
     }
     SvCUR_set(RETVAL, strlen(buf));
 OUTPUT: RETVAL

Modified: incubator/lucy/trunk/clownfish/src/CFCClass.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCClass.c?rev=1206607&r1=1206606&r2=1206607&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCClass.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCClass.c Sat Nov 26 21:35:21 2011
@@ -395,7 +395,7 @@ void
 CFCClass_add_attribute(CFCClass *self, const char *name, const char *value) {
     if (!name || !strlen(name)) { croak("'name' is required"); }
     if (CFCClass_has_attribute(self, name)) {
-        croak("Attribute '%s' already registered");
+        croak("Attribute '%s' already registered", name);
     }
     CFCClassAttribute *attribute
         = (CFCClassAttribute*)MALLOCATE(sizeof(CFCClassAttribute));

Modified: incubator/lucy/trunk/clownfish/src/CFCFile.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCFile.c?rev=1206607&r1=1206606&r2=1206607&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCFile.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCFile.c Sat Nov 26 21:35:21 2011
@@ -165,7 +165,8 @@ S_some_path(CFCFile *self, char *buf, si
         croak("ext cannot be more than 4 characters.");
     }
     if (needed > buf_size) {
-        croak("Need buf_size of %lu, but got %lu", needed, buf_size);
+        croak("Need buf_size of %lu, but got %lu", (unsigned long)needed,
+              (unsigned long)buf_size);
     }
     if (base_dir) {
         sprintf(buf, "%s" CFCUTIL_PATH_SEP "%s%s", base_dir, self->path_part,

Modified: incubator/lucy/trunk/clownfish/src/CFCPerlConstructor.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/src/CFCPerlConstructor.c?rev=1206607&r1=1206606&r2=1206607&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/src/CFCPerlConstructor.c (original)
+++ incubator/lucy/trunk/clownfish/src/CFCPerlConstructor.c Sat Nov 26 21:35:21 2011
@@ -101,7 +101,6 @@ CFCPerlConstructor_xsub_def(CFCPerlConst
     const char *c_name = self->sub.c_name;
     CFCParamList *param_list = self->sub.param_list;
     const char   *name_list  = CFCParamList_name_list(param_list);
-    const char  **arg_inits  = CFCParamList_get_initial_values(param_list);
     CFCVariable **arg_vars   = CFCParamList_get_variables(param_list);
     const char   *func_sym   = CFCFunction_full_func_sym(self->init_func);
     char *allot_params = CFCPerlSub_build_allot_params((CFCPerlSub*)self);