fixes most of these warnings (cc: bcc32): - XXX is assigned a value that is never used in function YYY - Unreachable code in function XXX
Index: memory.c =================================================================== RCS file: /cvs/public/parrot/memory.c,v retrieving revision 1.23 diff -u -r1.23 memory.c --- memory.c 1 Mar 2002 22:35:00 -0000 1.23 +++ memory.c 3 Mar 2002 16:17:03 -0000 @@ -43,7 +43,7 @@ ptrcast_t max_to_alloc = 0; ptrcast_t mask = 0; ptrcast_t i; - void *mem = NULL; + void *mem; /* Okay, we just brute-force things here. Yeah it's stupid, but it works */ Index: packfile.c =================================================================== RCS file: /cvs/public/parrot/packfile.c,v retrieving revision 1.27 diff -u -r1.27 packfile.c --- packfile.c 28 Feb 2002 00:27:48 -0000 1.27 +++ packfile.c 3 Mar 2002 16:17:05 -0000 @@ -1224,7 +1224,6 @@ default: fprintf(stderr, "PackFile_Constant_clear: Unrecognized type '%c' (%ld)!\n", (char)self->type, self->type); return; - break; } self->type = PFC_NONE; @@ -1330,7 +1329,6 @@ default: fprintf(stderr, "PackFile_Constant_clear: Unrecognized type '%c' during unpack!\n", (char) type); return 0; - break; } return rc; @@ -1353,9 +1351,6 @@ opcode_t PackFile_Constant_unpack_integer(struct PackFile_Constant * self, opcode_t * packed, opcode_t packed_size) { - opcode_t * cursor; - opcode_t value; - UNUSED (packed_size); if (!self) { @@ -1364,13 +1359,8 @@ PackFile_Constant_clear(self); - cursor = packed; - - value = *cursor; - cursor++; - self->type = PFC_INTEGER; - self->integer = value; + self->integer = *packed; return 1; } Index: pdump.c =================================================================== RCS file: /cvs/public/parrot/pdump.c,v retrieving revision 1.11 diff -u -r1.11 pdump.c --- pdump.c 21 Feb 2002 18:15:45 -0000 1.11 +++ pdump.c 3 Mar 2002 16:17:06 -0000 @@ -19,7 +19,7 @@ opcode_t * packed; size_t packed_size; struct PackFile * pf; - struct Parrot_Interp *interpreter = make_interpreter(0); + struct Parrot_Interp *interpreter; if (argc != 2) { fprintf(stderr, "pdump: usage: pdump FILE\n"); @@ -68,8 +68,6 @@ } PackFile_dump(pf); PackFile_DELETE(pf); - - pf = NULL; return 0; } Index: string.c =================================================================== RCS file: /cvs/public/parrot/string.c,v retrieving revision 1.51 diff -u -r1.51 string.c --- string.c 1 Mar 2002 06:15:14 -0000 1.51 +++ string.c 3 Mar 2002 16:17:07 -0000 @@ -351,7 +351,6 @@ src->encoding, 0, src->type); if (subend_off < substart_off) { - char *foo = NULL; internal_exception(SUBSTR_OUT_OF_STRING, "subend somehow is less than substart"); } Index: encodings/utf16.c =================================================================== RCS file: /cvs/public/parrot/encodings/utf16.c,v retrieving revision 1.9 diff -u -r1.9 utf16.c --- encodings/utf16.c 14 Jan 2002 20:04:26 -0000 1.9 +++ encodings/utf16.c 3 Mar 2002 16:17:07 -0000 @@ -41,7 +41,7 @@ UINTVAL c = *u16ptr++; if (UNICODE_IS_HIGH_SURROGATE(c)) { - utf16_t low = *u16ptr++; + utf16_t low = *u16ptr; if (!UNICODE_IS_LOW_SURROGATE(low)) { internal_exception(MALFORMED_UTF16, "Malformed UTF-16 surrogate\n"); Index: io/io.c =================================================================== RCS file: /cvs/public/parrot/io/io.c,v retrieving revision 1.16 diff -u -r1.16 io.c --- io/io.c 21 Feb 2002 18:09:24 -0000 1.16 +++ io/io.c 3 Mar 2002 16:17:10 -0000 @@ -94,7 +94,6 @@ */ void PIO_init(theINTERP) { - int err; /* Has interp been initialized already? */ if(interpreter->piodata) return; @@ -108,7 +107,7 @@ internal_exception(PIO_ERROR, "PIO alloc table failure."); /* Init IO stacks and handles for interp instance. */ - if((err = PIO_init_stacks(interpreter)) != 0) { + if(PIO_init_stacks(interpreter)) { internal_exception(PIO_ERROR, "PIO init stacks failed."); }