diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2012-08-04 23:34:08 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2012-08-04 23:34:08 +1000 |
commit | b16dd680446ecd2ec8a6b5c2e2ad88616608f10e (patch) | |
tree | 484eb100195bc9c6c7a082e8bf19698f34db34ff | |
parent | 72977b2a21e2b3092bcd362e61d5947a2915cce3 (diff) | |
download | ffi-1.1.4.tar.gz |
Cleanup some warnings1.1.4
-rw-r--r-- | ext/ffi_c/StructLayout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/ffi_c/StructLayout.c b/ext/ffi_c/StructLayout.c index 36df230..9bed49d 100644 --- a/ext/ffi_c/StructLayout.c +++ b/ext/ffi_c/StructLayout.c @@ -357,7 +357,7 @@ struct_layout_initialize(VALUE self, VALUE fields, VALUE size, VALUE align) layout->fieldCount = (int) RARRAY_LEN(fields); layout->rbFieldMap = rb_hash_new(); layout->rbFieldNames = rb_ary_new2(layout->fieldCount); - layout->size = FFI_ALIGN(NUM2INT(size), NUM2INT(align)); + layout->size = (int) FFI_ALIGN(NUM2INT(size), NUM2INT(align)); layout->align = NUM2INT(align); layout->fields = xcalloc(layout->fieldCount, sizeof(StructField *)); layout->ffiTypes = xcalloc(layout->fieldCount + 1, sizeof(ffi_type *)); @@ -423,7 +423,7 @@ struct_layout_union_bang(VALUE self) for (i = 0; alignment_types[i] != NULL; ++i) { if (alignment_types[i]->alignment == layout->align) { - t = alignment_types[i]; + t = (ffi_type *) alignment_types[i]; break; } } @@ -432,7 +432,7 @@ struct_layout_union_bang(VALUE self) return Qnil; } - count = layout->size / t->size; + count = (int) layout->size / t->size; xfree(layout->ffiTypes); layout->ffiTypes = xcalloc(count + 1, sizeof(ffi_type *)); layout->base.ffiType->elements = layout->ffiTypes; |