[svn:parrot] r48827 - trunk/src
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Sep 7 21:04:50 UTC 2010
Author: chromatic
Date: Tue Sep 7 21:04:50 2010
New Revision: 48827
URL: https://trac.parrot.org/parrot/changeset/48827
Log:
[pf] Fixed some compiler warnings.
Modified:
trunk/src/packfile.c
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Tue Sep 7 20:47:16 2010 (r48826)
+++ trunk/src/packfile.c Tue Sep 7 21:04:50 2010 (r48827)
@@ -2778,7 +2778,7 @@
ASSERT_ARGS(byte_code_unpack)
PackFile_ByteCode * const byte_code = (PackFile_ByteCode *)self;
int i;
- int total_ops = 0;
+ size_t total_ops = 0;
byte_code->op_count = PF_fetch_opcode(self->pf, &cursor);
byte_code->op_func_table = mem_gc_allocate_n_zeroed_typed(interp,
@@ -2849,12 +2849,12 @@
opcode_t idx = PF_fetch_opcode(self->pf, &cursor);
opcode_t op = PF_fetch_opcode(self->pf, &cursor);
- if (0 > op || op >= entry->lib->op_count)
+ if (0 > op || (size_t)op >= entry->lib->op_count)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"opcode index out of bounds on library `%s'. Found %d, expected 0 to %d.",
entry->lib->name, op, entry->lib->op_count - 1);
- if (0 > idx || idx >= byte_code->op_count)
+ if (0 > idx || (size_t)idx >= byte_code->op_count)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"op table index out of bounds for entry from library `%s'."
" Found %d, expected 0 to %d",
More information about the parrot-commits
mailing list