> This patch removes a bunch of warnings that have accumulated with MSVC
> recently.
And since I tested the patch with MSVC running, I forgot to run make to
rebuild core_ops.c. Attached patch should be used instead of the previous
one, as this one actually compiles. :)
Mike Lambert
Index: byteorder.c
===================================================================
RCS file: /cvs/public/parrot/byteorder.c,v
retrieving revision 1.9
diff -u -r1.9 byteorder.c
--- byteorder.c 9 May 2002 23:12:09 -0000 1.9
+++ byteorder.c 20 May 2002 01:08:00 -0000
@@ -52,10 +52,10 @@
#if PARROT_BIGENDIAN
return w;
#else
- INTVAL r;
# if INTVAL_SIZE == 4
return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w>>24);
# else
+ INTVAL r;
r = w << 56;
r |= (w & 0xff00) << 40;
r |= (w & 0xff0000) << 24;
@@ -77,11 +77,11 @@
#if PARROT_BIGENDIAN
return w;
#else
- opcode_t r;
# if OPCODE_T_SIZE == 4
return (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) |
((w & 0xff000000) >>24);
# else
+ opcode_t r;
r = w << 56;
r |= (w & 0xff00) << 40;
r |= (w & 0xff0000) << 24;
Index: core.ops
===================================================================
RCS file: /cvs/public/parrot/core.ops,v
retrieving revision 1.141
diff -u -r1.141 core.ops
--- core.ops 19 May 2002 07:49:50 -0000 1.141
+++ core.ops 20 May 2002 01:08:01 -0000
@@ -1936,7 +1936,6 @@
inline op pack(inout STR, in INT, in STR) {
STRING *t,*s = $3;
UINTVAL len = (UINTVAL)$2;
- char *c = s->bufstart;
char buf[3];
if (s->buflen < len) {
@@ -1955,9 +1954,9 @@
inline op pack(inout STR, in INT, in INT, in INT) {
char *c = (char *)&$3, *n;
STRING *s;
- const char *t,*f;
+ const char *t;
int i;
-
+
s = string_make(interpreter, c, (UINTVAL)$2, NULL, 0, NULL);
/* XXX this is EVIL, use string_replace */
n = $1->bufstart;
@@ -3205,6 +3204,7 @@
/* Should just assign undef, but we don't have one yet */
$1->vtable = YOU_LOSE_VTABLE;
$1->flags = PMC_live_FLAG;
+ goto NEXT();
}
########################################
Index: hash.c
===================================================================
RCS file: /cvs/public/parrot/hash.c,v
retrieving revision 1.2
diff -u -r1.2 hash.c
--- hash.c 18 May 2002 02:32:27 -0000 1.2
+++ hash.c 20 May 2002 01:08:01 -0000
@@ -211,7 +211,6 @@
UINTVAL i;
UINTVAL old_pool_size = hash->bucket_pool->buflen / sizeof(HASHBUCKET);
UINTVAL new_pool_size = new_size * MAXFULL_PERCENT / 100;
- HASHBUCKET* old_pool = (HASHBUCKET*) hash->bucket_pool->bufstart;
Parrot_reallocate(interpreter, hash, new_size * sizeof(HASHBUCKET*));
Parrot_reallocate(interpreter, hash->bucket_pool,
@@ -282,7 +281,6 @@
static HASHBUCKET *
find_bucket(Interp *interpreter, HASHBUCKET *head, STRING *key)
{
- KEY_ATOM *pair = NULL;
if (head != NULL) {
if (key != NULL) {
while (head != NULL) {
Index: memory.c
===================================================================
RCS file: /cvs/public/parrot/memory.c,v
retrieving revision 1.34
diff -u -r1.34 memory.c
--- memory.c 15 May 2002 04:07:20 -0000 1.34
+++ memory.c 20 May 2002 01:08:01 -0000
@@ -98,7 +98,6 @@
void
mem_setup_allocator(struct Parrot_Interp *interpreter)
{
- size_t temp_len;
interpreter->arena_base = mem_sys_allocate(sizeof(struct Arenas));
interpreter->arena_base->sized_header_pools = NULL;
interpreter->arena_base->num_sized = 0;
Index: packfile.c
===================================================================
RCS file: /cvs/public/parrot/packfile.c,v
retrieving revision 1.47
diff -u -r1.47 packfile.c
--- packfile.c 9 May 2002 20:57:18 -0000 1.47
+++ packfile.c 20 May 2002 01:08:02 -0000
@@ -837,7 +837,7 @@
#if TRACE_PACKFILE
fprintf(stderr, "FIXME: PackFile_Constant_unpack_number: assuming size of
FLOATVAL!\n");
#endif
- self->number = PackFile_fetch_nv(pf, (unsigned char *)cursor);
+ self->number = PackFile_fetch_nv(pf, (opcode_t *)cursor);
self->type = PFC_NUMBER;
/* self->number = f.value; */
Index: resources.c
===================================================================
RCS file: /cvs/public/parrot/resources.c,v
retrieving revision 1.54
diff -u -r1.54 resources.c
--- resources.c 15 May 2002 01:13:52 -0000 1.54
+++ resources.c 20 May 2002 01:08:03 -0000
@@ -781,13 +781,12 @@
else header_pool = interpreter->arena_base->sized_header_pools[j];
if (header_pool == NULL) continue;
- for (cur_buffer_arena = header_pool->last_Arena;
- NULL != cur_buffer_arena;
+ for (cur_buffer_arena = header_pool->last_Arena;
+ NULL != cur_buffer_arena;
cur_buffer_arena = cur_buffer_arena->prev)
{
- Buffer *buffer_array = cur_buffer_arena->start_Buffer;
UINTVAL i;
- for (i = 0; i < cur_buffer_arena->used; i++) {
+ for (i = 0; i < cur_buffer_arena->used; i++) {
Buffer *buffer = (Buffer*)((char*)cur_buffer_arena->start_Buffer + i
* header_pool->unit_size);
/* Is the string live, and can we move it? */
Index: runops_cores.c
===================================================================
RCS file: /cvs/public/parrot/runops_cores.c,v
retrieving revision 1.18
diff -u -r1.18 runops_cores.c
--- runops_cores.c 11 May 2002 20:20:05 -0000 1.18
+++ runops_cores.c 20 May 2002 01:08:03 -0000
@@ -50,11 +50,11 @@
{
#ifdef HAVE_COMPUTED_GOTO
pc = cg_core(pc, interpreter);
+ return pc;
#else
fprintf(stderr, "Computed goto unavailable in this configuration.\n");
exit(1);
#endif
- return pc;
}
/*=for api interpreter runops_slow_core
Index: classes/perlarray.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/perlarray.pmc,v
retrieving revision 1.29
diff -u -r1.29 perlarray.pmc
--- classes/perlarray.pmc 15 May 2002 01:45:06 -0000 1.29
+++ classes/perlarray.pmc 20 May 2002 01:08:04 -0000
@@ -353,7 +353,6 @@
void set_pmc_keyed (KEY* dest_key, PMC* src, KEY* src_key) {
INTVAL ix;
- PMC* pmc2;
PMC** array;
if (!dest_key) {
Index: classes/perlhash.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/perlhash.pmc,v
retrieving revision 1.18
diff -u -r1.18 perlhash.pmc
--- classes/perlhash.pmc 19 May 2002 07:49:33 -0000 1.18
+++ classes/perlhash.pmc 20 May 2002 01:08:05 -0000
@@ -154,7 +154,6 @@
}
PMC* get_pmc_keyed (KEY * key) {
- PMC* valpmc;
STRING* key_string = make_hash_key(INTERP, key);
KEY_ATOM* atom = hash_get(INTERP, (HASH*) SELF->data, key_string);
if (atom == NULL) {