summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2009-07-25 21:45:26 +0000
committerFrank Gevaerts <frank@gevaerts.be>2009-07-25 21:45:26 +0000
commit81d7bf9f21197665e9c0439b42a1a1772c81b0ee (patch)
tree1f1c92b1c17126988cce2af7f1fd3a7f9c371641
parenta175e3a42a18e3462095242700daa7229d6aa4c7 (diff)
downloadrockbox-81d7bf9f21197665e9c0439b42a1a1772c81b0ee.tar.gz
rockbox-81d7bf9f21197665e9c0439b42a1a1772c81b0ee.zip
Fix some casts from pointer to int, now cast to intptr_t
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22038 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/png/png.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/png/png.c b/apps/plugins/png/png.c
index d54d839a67..216077767c 100644
--- a/apps/plugins/png/png.c
+++ b/apps/plugins/png/png.c
@@ -1301,7 +1301,7 @@ void LodePNG_decode(LodePNG_Decoder* decoder, unsigned char* in, size_t insize,
1301 1301
1302 /*TODO: check if this works according to the statement in the documentation: "The converter can convert from greyscale input color type, to 8-bit greyscale or greyscale with alpha"*/ 1302 /*TODO: check if this works according to the statement in the documentation: "The converter can convert from greyscale input color type, to 8-bit greyscale or greyscale with alpha"*/
1303if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; } 1303if (!(decoder->infoRaw.color.colorType == 2 || decoder->infoRaw.color.colorType == 6) && !(decoder->infoRaw.color.bitDepth == 8)) { decoder->error = 56; return; }
1304 converted_image = (fb_data *)((int)(memory + 3) & ~3); 1304 converted_image = (fb_data *)((intptr_t)(memory + 3) & ~3);
1305 converted_image_size = FB_DATA_SZ*decoder->infoPng.width*decoder->infoPng.height; 1305 converted_image_size = FB_DATA_SZ*decoder->infoPng.width*decoder->infoPng.height;
1306 if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; } 1306 if ((unsigned char *)(converted_image + converted_image_size) >= decoded_image) { decoder->error = OUT_OF_MEMORY; }
1307 if (!decoder->error) decoder->error = LodePNG_convert(converted_image, decoded_image, &decoder->infoRaw.color, &decoder->infoPng.color, decoder->infoPng.width, decoder->infoPng.height); 1307 if (!decoder->error) decoder->error = LodePNG_convert(converted_image, decoded_image, &decoder->infoRaw.color, &decoder->infoPng.color, decoder->infoPng.width, decoder->infoPng.height);
@@ -1832,7 +1832,7 @@ fb_data *get_image(struct LodePNG_Decoder* decoder)
1832 } 1832 }
1833 static struct bitmap bmp_src, bmp_dst; 1833 static struct bitmap bmp_src, bmp_dst;
1834 1834
1835 disp[ds] = (fb_data *)((int)(previous_disp + previous_size + 3) & ~3); 1835 disp[ds] = (fb_data *)((intptr_t)(previous_disp + previous_size + 3) & ~3);
1836 1836
1837 if ((unsigned char *)(disp[ds] + size[ds]) >= memory_max) { 1837 if ((unsigned char *)(disp[ds] + size[ds]) >= memory_max) {
1838 //rb->splash(HZ, "Out of Memory"); 1838 //rb->splash(HZ, "Out of Memory");