In message <[EMAIL PROTECTED]>
Simon Cozens <[EMAIL PROTECTED]> wrote:
> So, if you're running on one of the core platforms, please check out a
> *clean* CVS copy, try and build and post the output of make test.
Tests cleanly on linux/x86:
perl t/harness
t/op/basic......ok, 1/2 skipped: label constants unimplemented in assembler
t/op/integer....ok
t/op/number.....ok, 2/23 skipped: various reasons
t/op/string.....ok, 1/5 skipped: I'm unable to write it!
t/op/trans......ok
All tests successful, 4 subtests skipped.
Files=5, Tests=74, 45 wallclock secs (38.60 cusr + 6.28 csys = 44.88 CPU)
Builds cleanly with -Wall with the exception of these warnings
in packfile.c:
packfile.c:964:3: warning: "/*" within comment
packfile.c:967:3: warning: "/*" within comment
packfile.c: In function `PackFile_unpack':
packfile.c:323: warning: int format, IV arg (arg 3)
packfile.c:344: warning: int format, IV arg (arg 3)
packfile.c:287: warning: unused variable `byte_code_ptr'
packfile.c:285: warning: unused variable `segment_ptr'
packfile.c: In function `PackFile_dump':
packfile.c:461: warning: unsigned int format, long unsigned int arg (arg 2)
packfile.c:474: warning: unsigned int format, long unsigned int arg (arg 2)
packfile.c:476: warning: unsigned int format, long unsigned int arg (arg 2)
packfile.c: In function `PackFile_ConstTable_dump':
packfile.c:938: warning: int format, IV arg (arg 2)
packfile.c: In function `PackFile_Constant_unpack':
packfile.c:1233: warning: unused variable `i'
packfile.c: In function `PackFile_Constant_dump':
packfile.c:1358: warning: unsigned int format, long unsigned int arg (arg 2)
The attached patch will clean up those warnings.
Tom
--
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
Index: packfile.c
===================================================================
RCS file: /home/perlcvs/parrot/packfile.c,v
retrieving revision 1.4
diff -u -r1.4 packfile.c
--- packfile.c 2001/09/20 21:41:40 1.4
+++ packfile.c 2001/09/20 22:41:46
@@ -180,7 +180,7 @@
***************************************/
-void
+void
PackFile_set_magic(PackFile * self, IV magic) {
self->magic = magic;
}
@@ -282,9 +282,7 @@
IV
PackFile_unpack(PackFile * self, char * packed, IV packed_size) {
- IV * segment_ptr;
IV segment_size;
- char * byte_code_ptr;
char * cursor;
IV * iv_ptr;
@@ -317,9 +315,9 @@
iv_ptr = (IV *)cursor;
segment_size = *iv_ptr;
cursor += sizeof(IV);
-
+
if (segment_size % sizeof(IV)) {
- fprintf(stderr, "PackFile_unpack: Illegal fixup table segment size %d (must
be multiple of %d!\n",
+ fprintf(stderr, "PackFile_unpack: Illegal fixup table segment size %ld (must
+be multiple of %d!\n",
segment_size, sizeof(IV));
return 0;
}
@@ -338,13 +336,13 @@
iv_ptr = (IV *)cursor;
segment_size = *iv_ptr;
cursor += sizeof(IV);
-
+
if (segment_size % sizeof(IV)) {
- fprintf(stderr, "PackFile_unpack: Illegal constant table segment size %d
(must be multiple of %d!\n",
+ fprintf(stderr, "PackFile_unpack: Illegal constant table segment size %ld
+(must be multiple of %d!\n",
segment_size, sizeof(IV));
return 0;
}
-
+
if (!PackFile_ConstTable_unpack(self->const_table, cursor, segment_size)) {
fprintf(stderr, "PackFile_unpack: Error reading constant table segment!\n");
return 0;
@@ -366,7 +364,7 @@
self->byte_code_size = 0;
return 0;
}
-
+
mem_sys_memcopy(self->byte_code, cursor, self->byte_code_size);
}
@@ -432,7 +430,7 @@
iv_ptr = (IV *)cursor;
*iv_ptr = const_table_size;
cursor += sizeof(IV);
-
+
PackFile_ConstTable_pack(self->const_table, cursor);
cursor += const_table_size;
@@ -458,7 +456,7 @@
PackFile_dump(PackFile * self) {
IV i;
- printf("MAGIC => 0x%08x,\n", self->magic);
+ printf("MAGIC => 0x%08lx,\n", self->magic);
printf("FIXUP => {\n");
PackFile_FixupTable_dump(self->fixup_table);
@@ -471,9 +469,9 @@
printf("BCODE => [");
for (i = 0; i < self->byte_code_size / 4; i++) {
if (i % 8 == 0) {
- printf("\n %08x: ", i * 4);
+ printf("\n %08lx: ", i * 4);
}
- printf("%08x ", ((IV *)(self->byte_code))[i]);
+ printf("%08lx ", ((IV *)(self->byte_code))[i]);
}
printf("\n]\n");
@@ -837,7 +835,7 @@
iv_ptr = (IV *)cursor;
self->const_count = *iv_ptr;
cursor += sizeof(IV);
-
+
if (self->const_count == 0) {
return 1;
}
@@ -857,7 +855,7 @@
cursor += PackFile_Constant_pack_size(self->constants[i]);
}
-
+
return 1;
}
@@ -915,7 +913,7 @@
cursor += PackFile_Constant_pack_size(self->constants[i]);
}
-
+
return;
}
@@ -935,10 +933,10 @@
IV i;
for(i = 0; i < self->const_count; i++) {
- printf(" # %d:\n", i);
+ printf(" # %ld:\n", i);
PackFile_Constant_dump(self->constants[i]);
}
-
+
return;
}
@@ -961,7 +959,7 @@
=cut
-/******************************************************************************
+******************************************************************************/
/***************************************
@@ -1230,7 +1228,6 @@
PackFile_Constant_unpack(PackFile_Constant * self, char * packed, IV packed_size) {
char * cursor;
IV * iv_ptr;
- IV i;
cursor = packed;
@@ -1355,7 +1352,7 @@
PackFile_Constant_dump(PackFile_Constant * self) {
printf(" {\n");
- printf(" FLAGS => %04x,\n", self->flags);
+ printf(" FLAGS => %04lx,\n", self->flags);
printf(" ENCODING => %ld,\n", self->encoding);
printf(" TYPE => %ld,\n", self->type);
printf(" SIZE => %ld,\n", self->size);