tiffdec,MyRead: quiet -Wshorten-64-to-32 warning

Change-Id: I7e2c7a9b80278b3056151c74a939b0f55bbbc90c
This commit is contained in:
James Zern 2017-05-17 12:06:53 -07:00
parent dabda70733
commit d988eb7b39

View File

@ -107,7 +107,7 @@ static void MyUnmapFile(thandle_t opaque, void* base, toff_t size) {
static tsize_t MyRead(thandle_t opaque, void* dst, tsize_t size) { static tsize_t MyRead(thandle_t opaque, void* dst, tsize_t size) {
MyData* const my_data = (MyData*)opaque; MyData* const my_data = (MyData*)opaque;
if (my_data->pos + size > my_data->size) { if (my_data->pos + size > my_data->size) {
size = my_data->size - my_data->pos; size = (tsize_t)(my_data->size - my_data->pos);
} }
if (size > 0) { if (size > 0) {
memcpy(dst, my_data->data + my_data->pos, size); memcpy(dst, my_data->data + my_data->pos, size);