Author: leo
Date: Tue Feb 21 11:33:43 2006
New Revision: 11698

Modified:
   trunk/compilers/imcc/optimizer.c
   trunk/include/parrot/interpreter.h
   trunk/src/embed.c
   trunk/src/io/io_unix.c
   trunk/src/runops_cores.c
Log:
remove warnings: no prototype, missing retval, uninit, unused, ...

Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c    (original)
+++ trunk/compilers/imcc/optimizer.c    Tue Feb 21 11:33:43 2006
@@ -700,7 +700,7 @@ IMCC_subst_constants(Interp *interpreter
 
     size_t i;
     char b[128], fmt[64], op[20];
-    const char *debug_fmt;
+    const char *debug_fmt = NULL;   /* gcc -O uninit warn */
     int found, branched;
     parrot_context_t *ctx;
     INTVAL regs_used[4] = {3,3,3,3};

Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h  (original)
+++ trunk/include/parrot/interpreter.h  Tue Feb 21 11:33:43 2006
@@ -184,7 +184,7 @@ typedef struct Parrot_Context {
     /* end common header */
     INTVAL *n_regs_used;               /* INSP in PBC points to Sub */
     size_t regs_mem_size;               /* memory occupied by registers */
-    INTVAL ref_count;                   /* how often refered to */
+    int ref_count;                   /* how often refered to */
     struct Stack_Chunk *reg_stack;      /* register stack */
 
     struct Stack_Chunk *user_stack;     /* Base of the scratch stack */

Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c   (original)
+++ trunk/src/embed.c   Tue Feb 21 11:33:43 2006
@@ -837,6 +837,7 @@ Parrot_debug(Interp *debugger, opcode_t 
         command = pdb->cur_command;
         PDB_run_command(debugger, command);
     }
+    return NULL;
 }
 
 /*

Modified: trunk/src/io/io_unix.c
==============================================================================
--- trunk/src/io/io_unix.c      (original)
+++ trunk/src/io/io_unix.c      Tue Feb 21 11:33:43 2006
@@ -294,9 +294,6 @@ PIO_unix_fdopen(theINTERP, ParrotIOLayer
 {
     ParrotIO *io;
     INTVAL oflags, mode;
-#  ifdef PARROT_HAS_HEADER_FCNTL
-    INTVAL rflags;
-#  endif
 
     UNUSED(layer);
 
@@ -311,15 +308,18 @@ PIO_unix_fdopen(theINTERP, ParrotIOLayer
 
     /* FIXME - Check file handle flags, validity */
 #  ifdef PARROT_HAS_HEADER_FCNTL
-    /* Get descriptor flags */
-    if ((rflags = fcntl(fd, F_GETFL, 0)) >= 0) {
-        UNUSED(rflags);
-        /*int accmode = rflags & O_ACCMODE; */
-        /* Check other flags (APPEND, ASYNC, etc) */
-    }
-    else {
-        /* Probably invalid descriptor */
-        return NULL;
+    {
+        INTVAL rflags;
+        /* Get descriptor flags */
+        if ((rflags = fcntl(fd, F_GETFL, 0)) >= 0) {
+            UNUSED(rflags);
+            /*int accmode = rflags & O_ACCMODE; */
+            /* Check other flags (APPEND, ASYNC, etc) */
+        }
+        else {
+            /* Probably invalid descriptor */
+            return NULL;
+        }
     }
 #  endif
 #endif

Modified: trunk/src/runops_cores.c
==============================================================================
--- trunk/src/runops_cores.c    (original)
+++ trunk/src/runops_cores.c    Tue Feb 21 11:33:43 2006
@@ -22,6 +22,7 @@ the faster dispatch of operations.
 */
 
 #include "parrot/runops_cores.h"
+#include "parrot/embed.h"
 #include "parrot/trace.h"
 
 #include "parrot/interp_guts.h"

Reply via email to