diff --git a/tests/cpp_tests/image_io_test.cpp b/tests/cpp_tests/image_io_test.cpp index aae80ede0..2767bc2e0 100644 --- a/tests/cpp_tests/image_io_test.cpp +++ b/tests/cpp_tests/image_io_test.cpp @@ -23,7 +23,7 @@ int main(int argc, char** argv) { mapnik::image_data_32 im(256,256); unsigned char* bytes = im.getBytes(); - mapnik::image_data_32 * im_ptr = new mapnik::image_data_32(256,256,(unsigned int *)bytes); + mapnik::image_data_32 * im_ptr = new mapnik::image_data_32(im.width(),im.height(),static_cast(bytes)); unsigned char* same_bytes = im_ptr->getBytes(); BOOST_TEST(bytes == same_bytes); delete im_ptr;