[svn:parrot] r39824 - trunk/compilers/imcc

petdance at svn.parrot.org petdance at svn.parrot.org
Mon Jun 29 07:11:48 UTC 2009


Author: petdance
Date: Mon Jun 29 07:11:48 2009
New Revision: 39824
URL: https://trac.parrot.org/parrot/changeset/39824

Log:
adding splint annotations. Removed an unnecessary const-removing cast

Modified:
   trunk/compilers/imcc/optimizer.c

Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c	Mon Jun 29 06:43:52 2009	(r39823)
+++ trunk/compilers/imcc/optimizer.c	Mon Jun 29 07:11:48 2009	(r39824)
@@ -291,9 +291,9 @@
 get_neg_op(ARGIN(const char *op), ARGOUT(int *n))
 {
     ASSERT_ARGS(get_neg_op)
-    static const struct br_pairs {
-        const char * const op;
-        const char * const nop;
+    PARROT_OBSERVER static const struct br_pairs {
+        PARROT_OBSERVER const char * const op;
+        PARROT_OBSERVER const char * const nop;
         int n;
     } br_pairs[] = {
         { "if", "unless", 2 },
@@ -360,10 +360,10 @@
                 IMCC_debug(interp, DEBUG_OPT1, "if_branch %s ... %s\n",
                         last->opname, br_dest->name);
                 /* find the negated op (e.g if->unless, ne->eq ... */
-                if ((neg_op = get_neg_op(last->opname, &args)) != 0) {
+                if ((neg_op = get_neg_op(last->opname, &args)) != NULL) {
                     Instruction * tmp;
                     last->symregs[reg] = go;
-                    tmp = INS(interp, unit, (char*)neg_op, "",
+                    tmp = INS(interp, unit, neg_op, "",
                               last->symregs, args, 0, 0);
                     last->opnum = tmp->opnum;
                     last->opsize = tmp->opsize;
@@ -757,7 +757,7 @@
 {
     ASSERT_ARGS(IMCC_subst_constants_umix)
     Instruction *tmp;
-    const char * const ops[] = {
+    PARROT_OBSERVER const char * const ops[] = {
         "abs", "add", "div", "mul", "sub", "fdiv"
     };
     size_t i;


More information about the parrot-commits mailing list