Author: particle
Date: Thu Nov 10 09:53:15 2005
New Revision: 9888
Modified:
trunk/classes/complex.pmc
trunk/classes/eval.pmc
trunk/classes/floatvalarray.pmc
trunk/classes/integer.pmc
trunk/classes/nci.pmc
trunk/classes/pair.pmc
Log:
suppress compile warnings in classes/*
Modified: trunk/classes/complex.pmc
==============================================================================
--- trunk/classes/complex.pmc (original)
+++ trunk/classes/complex.pmc Thu Nov 10 09:53:15 2005
@@ -970,11 +970,7 @@ MMD_Complex: {
IM(SELF) == IM(value)
);
}
-MMD_Float: {
-/*
- XXX: the above really should be MMD_DEFAULT, but that causes
- t/dynclass/pycomplex.t to fail.
-*/
+MMD_DEFAULT: {
if(IM(SELF) != 0.0)
return (INTVAL)0;
return (RE(SELF) == VTABLE_get_number(INTERP, value));
Modified: trunk/classes/eval.pmc
==============================================================================
--- trunk/classes/eval.pmc (original)
+++ trunk/classes/eval.pmc Thu Nov 10 09:53:15 2005
@@ -195,7 +195,6 @@ for writing to disc and later loading vi
STRING *res;
struct PackFile *pf;
size_t size, aligned_size;
- opcode_t *packed;
struct PackFile_ByteCode *seg;
pf = PackFile_new(INTERP, 0);
Modified: trunk/classes/floatvalarray.pmc
==============================================================================
--- trunk/classes/floatvalarray.pmc (original)
+++ trunk/classes/floatvalarray.pmc Thu Nov 10 09:53:15 2005
@@ -105,11 +105,11 @@ Sets C<value> at index C<*key>.
*/
void set_number_keyed (PMC* key, FLOATVAL value) {
- FLOATVAL ix;
+ INTVAL ix;
if (!key) return;
- ix = key_number(INTERP, key);
+ ix = key_integer(INTERP, key);
list_assign(INTERP, (List*) PMC_struct_val(SELF),
ix, &value, enum_type_FLOATVAL);
}
@@ -155,9 +155,9 @@ Returns the value of the element at inde
*/
FLOATVAL get_number_keyed (PMC* key) {
- FLOATVAL ix;
+ INTVAL ix;
void *ret;
- ix = key_number(INTERP, key);
+ ix = key_integer(INTERP, key);
ret = list_get(INTERP, (List*) PMC_struct_val(SELF), ix,
enum_type_FLOATVAL);
return !ret || ret == (void*)-1 ? 0.0 : *(FLOATVAL*)ret;
Modified: trunk/classes/integer.pmc
==============================================================================
--- trunk/classes/integer.pmc (original)
+++ trunk/classes/integer.pmc Thu Nov 10 09:53:15 2005
@@ -775,7 +775,7 @@ MMD_DEFAULT: {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, dest,
- floor(DYNSELF.get_number() / d));
+ (INTVAL)floor(DYNSELF.get_number() / d));
return dest;
}
}
@@ -787,7 +787,7 @@ MMD_DEFAULT: {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, dest,
- floor(DYNSELF.get_number() / value));
+ (INTVAL)floor(DYNSELF.get_number() / value));
return dest;
}
@@ -798,7 +798,7 @@ MMD_DEFAULT: {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, dest,
- floor(DYNSELF.get_number() / value));
+ (INTVAL)floor(DYNSELF.get_number() / value));
return dest;
}
@@ -813,7 +813,7 @@ MMD_DEFAULT: {
real_exception(INTERP, NULL, E_ZeroDivisionError,
"float division by zero");
VTABLE_set_integer_native(INTERP, SELF,
- floor(DYNSELF.get_number() / d));
+ (INTVAL)floor(DYNSELF.get_number() / d));
}
}
@@ -822,7 +822,7 @@ MMD_DEFAULT: {
real_exception(INTERP, NULL, E_ZeroDivisionError,
"float division by zero");
VTABLE_set_integer_native(INTERP, SELF,
- floor(DYNSELF.get_number() / value));
+ (INTVAL)floor(DYNSELF.get_number() / value));
}
void i_floor_divide_float (FLOATVAL value) {
@@ -830,7 +830,7 @@ MMD_DEFAULT: {
real_exception(INTERP, NULL, E_ZeroDivisionError,
"float division by zero");
VTABLE_set_integer_native(INTERP, SELF,
- floor(DYNSELF.get_number() / value));
+ (INTVAL)floor(DYNSELF.get_number() / value));
}
/*
@@ -882,7 +882,7 @@ MMD_DEFAULT: {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, dest,
- fmod(DYNSELF.get_integer(), value));
+ (INTVAL)fmod(DYNSELF.get_integer(), value));
return dest;
}
@@ -925,7 +925,7 @@ MMD_DEFAULT: {
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int cmodulus by zero");
VTABLE_set_integer_native(INTERP, SELF,
- fmod(DYNSELF.get_integer(), value));
+ (INTVAL)fmod(DYNSELF.get_integer(), value));
}
/*
@@ -987,7 +987,7 @@ MMD_DEFAULT: {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, dest,
- intval_mod(DYNSELF.get_integer(), value));
+ intval_mod(DYNSELF.get_integer(), (INTVAL)value));
return dest;
}
void i_modulus (PMC* value) {
@@ -1018,7 +1018,7 @@ MMD_DEFAULT: {
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int modulus by zero");
VTABLE_set_integer_native(INTERP, SELF,
- intval_mod(DYNSELF.get_integer() , value));
+ intval_mod(DYNSELF.get_integer() , (INTVAL)value));
}
/*
Modified: trunk/classes/nci.pmc
==============================================================================
--- trunk/classes/nci.pmc (original)
+++ trunk/classes/nci.pmc Thu Nov 10 09:53:15 2005
@@ -124,7 +124,6 @@ shifted down.
void* invoke (void * next) {
Parrot_csub_t func = (Parrot_csub_t)D2FPTR(PMC_data(SELF));
- UINTVAL flags;
INTERP->current_cont = NULL;
if (!func)
Modified: trunk/classes/pair.pmc
==============================================================================
--- trunk/classes/pair.pmc (original)
+++ trunk/classes/pair.pmc Thu Nov 10 09:53:15 2005
@@ -238,8 +238,6 @@ Used to unarchive the Pair.
void thaw(visit_info *info) {
IMAGE_IO *io = info->image_io;
- Hash *hash;
- PMC *dummy;
SUPER(info);
if (info->extra_flags == EXTRA_IS_NULL) {