Fixes some bad returns, some unused variables, and some mismatched formats.
This should be distinct from my other pending patch, which changes the way function pointers are handled outside of the JIT. --Josh Index: embed.c =================================================================== RCS file: /home/perlcvs/parrot/embed.c,v retrieving revision 1.10 diff -u -r1.10 embed.c --- embed.c 15 Feb 2002 02:30:02 -0000 1.10 +++ embed.c 16 Feb 2002 05:36:44 -0000 @@ -466,8 +466,8 @@ /* Initialize interpreter's flags */ interpreter->flags = flags; - interpreter->warns = mem_sys_allocate(sizeof(struct warnings_t)); - PARROT_WARNINGS_off(interpreter, PARROT_WARNINGS_ALL_FLAG); + interpreter->warns = mem_sys_allocate(sizeof(struct warnings_t)); + PARROT_WARNINGS_off(interpreter, PARROT_WARNINGS_ALL_FLAG); interpreter->pmc_count = 0; interpreter->string_count = 0; Index: misc.c =================================================================== RCS file: /home/perlcvs/parrot/misc.c,v retrieving revision 1.11 diff -u -r1.11 misc.c --- misc.c 15 Feb 2002 02:30:02 -0000 1.11 +++ misc.c 16 Feb 2002 05:36:46 -0000 @@ -277,6 +277,7 @@ info.phase = PHASE_WIDTH; goto AGAIN; } + break; case PHASE_WIDTH: switch (ch) { @@ -301,6 +302,7 @@ info.phase = PHASE_PREC; goto AGAIN; } + break; case PHASE_PREC: switch (ch) { @@ -321,6 +323,7 @@ info.phase = PHASE_TYPE; goto AGAIN; } + break; case PHASE_TYPE: switch (ch) { Index: packfile.c =================================================================== RCS file: /home/perlcvs/parrot/packfile.c,v retrieving revision 1.25 diff -u -r1.25 packfile.c --- packfile.c 15 Feb 2002 02:30:02 -0000 1.25 +++ packfile.c 16 Feb 2002 05:36:47 -0000 @@ -1328,7 +1328,7 @@ break; default: - fprintf(stderr, "PackFile_Constant_clear: Unrecognized type '%c' during unpack!\n", (int) type); + fprintf(stderr, "PackFile_Constant_clear: Unrecognized type '%c' during +unpack!\n", (char) type); return 0; break; } @@ -1584,7 +1584,6 @@ void PackFile_Constant_pack(struct PackFile_Constant * self, opcode_t * packed) { opcode_t * cursor; - FLOATVAL * nv_ptr; char * charcursor; size_t i; opcode_t padded_size; @@ -1729,7 +1728,7 @@ case PFC_STRING: printf(" [ 'PFC_STRING', {\n"); - printf(" FLAGS => 0x%04lx,\n", (long) self->string->flags); + printf(" FLAGS => 0x%04lx,\n", (unsigned long) +self->string->flags); printf(" ENCODING => %s,\n", self->string->encoding->name); printf(" TYPE => %s,\n", Index: pdump.c =================================================================== RCS file: /home/perlcvs/parrot/pdump.c,v retrieving revision 1.8 diff -u -r1.8 pdump.c --- pdump.c 1 Jan 2002 19:49:11 -0000 1.8 +++ pdump.c 16 Feb 2002 05:36:47 -0000 @@ -62,7 +62,7 @@ pf = PackFile_new(); - if (!PackFile_unpack(interpreter, pf, packed, packed_size)) { + if (!PackFile_unpack(interpreter, pf, (opcode_t*)packed, packed_size)) { printf( "Can't unpack.\n" ); return 1; } Index: classes/array.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/array.pmc,v retrieving revision 1.12 diff -u -r1.12 array.pmc --- classes/array.pmc 14 Feb 2002 23:17:21 -0000 1.12 +++ classes/array.pmc 16 Feb 2002 05:36:48 -0000 @@ -189,7 +189,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -226,7 +226,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -261,7 +261,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; Index: classes/perlarray.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/perlarray.pmc,v retrieving revision 1.17 diff -u -r1.17 perlarray.pmc --- classes/perlarray.pmc 16 Feb 2002 00:03:07 -0000 1.17 +++ classes/perlarray.pmc 16 Feb 2002 05:36:48 -0000 @@ -181,7 +181,7 @@ PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -221,7 +221,7 @@ PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -259,7 +259,7 @@ PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; Index: classes/perlhash.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/perlhash.pmc,v retrieving revision 1.12 diff -u -r1.12 perlhash.pmc --- classes/perlhash.pmc 16 Feb 2002 00:03:07 -0000 1.12 +++ classes/perlhash.pmc 16 Feb 2002 05:36:49 -0000 @@ -1,4 +1,4 @@ -/* perlhash.pmc + /* perlhash.pmc * Copyright: (When this is determined...it will go here) * CVS Info * $Id: perlhash.pmc,v 1.12 2002/02/16 00:03:07 simon Exp $ @@ -173,7 +173,7 @@ PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -215,7 +215,7 @@ PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; Index: io/io_stdio.c =================================================================== RCS file: /home/perlcvs/parrot/io/io_stdio.c,v retrieving revision 1.11 diff -u -r1.11 io_stdio.c --- io/io_stdio.c 28 Jan 2002 04:27:17 -0000 1.11 +++ io/io_stdio.c 16 Feb 2002 05:36:50 -0000 @@ -231,7 +231,6 @@ const void * buffer, size_t len) { size_t avail; long wrote; - ParrotIOLayer * l; if(len <= 0) return 0; Index: io/io_unix.c =================================================================== RCS file: /home/perlcvs/parrot/io/io_unix.c,v retrieving revision 1.8 diff -u -r1.8 io_unix.c --- io/io_unix.c 30 Jan 2002 15:50:30 -0000 1.8 +++ io/io_unix.c 16 Feb 2002 05:36:50 -0000 @@ -108,7 +108,6 @@ UINTVAL mode; INTVAL oflags, type; PIOHANDLE fd; - const char * modeptr; type = PIO_TYPE_FILE; mode = DEFAULT_OPEN_MODE; @@ -183,13 +182,16 @@ ParrotIO * PIO_unix_fdopen(theINTERP, ParrotIOLayer * layer, PIOHANDLE fd, UINTVAL flags) { ParrotIO * io; - UINTVAL oflags, rflags, mode; + UINTVAL oflags, mode; mode = 0; +#ifdef HAS_HEADER_FCNTL + UNITVAL rflags; +#endif oflags = flags_to_unix(flags); /* FIXME - Check file handle flags, validity */ -#ifdef HAD_HEADER_FCNTL +#ifdef HAS_HEADER_FCNTL /* Get descriptor flags */ if((rflags = fcntl(fd, F_GETFL, 0)) >= 0) { /*int accmode = rflags & O_ACCMODE;*/ Index: lib/Parrot/OpTrans/CPrederef.pm =================================================================== RCS file: /home/perlcvs/parrot/lib/Parrot/OpTrans/CPrederef.pm,v retrieving revision 1.6 diff -u -r1.6 CPrederef.pm --- lib/Parrot/OpTrans/CPrederef.pm 15 Feb 2002 03:25:00 -0000 1.6 +++ lib/Parrot/OpTrans/CPrederef.pm 16 Feb 2002 05:36:50 -0000 @@ -25,7 +25,7 @@ #define REL_PC ((size_t)(cur_opcode - interpreter->prederef_code)) #define CUR_OPCODE (((opcode_t *)interpreter->code->byte_code) + REL_PC) -static inline opcode_t* prederef_to_opcode(struct Parrot_Interp* interpreter, +static opcode_t* prederef_to_opcode(struct Parrot_Interp* interpreter, void** prederef_addr) { ssize_t offset_in_ops; @@ -34,7 +34,7 @@ return (opcode_t*) interpreter->code->byte_code + offset_in_ops; } -static inline void** opcode_to_prederef(struct Parrot_Interp* interpreter, +static void** opcode_to_prederef(struct Parrot_Interp* interpreter, opcode_t* opcode_addr) { ssize_t offset_in_ops;