Hi,

from time to time i do a little warning patrol in parrot and configure
with --ccwarn=-Werror.
Only a few fixes in imcc are needed to compile warning-free, most of
them are unused parameters and variables.
I know IMCC is under heavy development right now so I will not comit
these fixes but only send them to the list as a suggestion.
bye
b�

Index: imcc//instructions.c
===================================================================
RCS file: /cvs/public/parrot/imcc/instructions.c,v
retrieving revision 1.51
diff -u -r1.51 instructions.c
--- imcc//instructions.c	19 Nov 2003 07:26:22 -0000	1.51
+++ imcc//instructions.c	20 Nov 2003 15:15:04 -0000
@@ -36,7 +36,7 @@
 Emitter emitters[2] = {
     {e_file_open,
      e_file_emit,
-     (int (*)(void *))NULLfunc,
+     (int (*)(void *, IMC_Unit *))NULLfunc,
      e_file_close},
 
     {e_pbc_open,
@@ -471,6 +471,7 @@
 e_file_emit(void *param, IMC_Unit * unit, Instruction * ins)
 {
     UNUSED(param);
+    UNUSED(unit);
 #if IMC_TRACE
     PIO_eprintf(NULL, "e_file_emit\n");
 #endif
@@ -498,7 +499,7 @@
 int
 emit_flush(void *param, IMC_Unit * unit)
 {
-    Instruction * ins, *next;
+    Instruction * ins;
     struct Parrot_Interp *interpreter = (struct Parrot_Interp *)param;
 #if IMC_TRACE
     fprintf(stderr, "instructions.c: emit_flush\n");
Index: imcc//pbc.c
===================================================================
RCS file: /cvs/public/parrot/imcc/pbc.c,v
retrieving revision 1.58
diff -u -r1.58 pbc.c
--- imcc//pbc.c	19 Nov 2003 07:26:55 -0000	1.58
+++ imcc//pbc.c	20 Nov 2003 15:15:05 -0000
@@ -77,7 +77,6 @@
 {
     struct cs_t *cs, *prev_cs;
     struct subs *s, *prev_s;
-    struct Parrot_Interp *interpreter = (struct Parrot_Interp *)param;
     SymReg **h;
 
     UNUSED(ex);
Index: imcc//pcc.c
===================================================================
RCS file: /cvs/public/parrot/imcc/pcc.c,v
retrieving revision 1.34
diff -u -r1.34 pcc.c
--- imcc//pcc.c	19 Nov 2003 07:29:40 -0000	1.34
+++ imcc//pcc.c	20 Nov 2003 15:15:05 -0000
@@ -532,6 +532,8 @@
     int call_found, ret_found;
     int i, j, matching;
     struct pcc_sub_t *call, *ret;
+
+    UNUSED(unit);
     /*
      * currently only with -Oc
      */

Reply via email to