Remove unused variables

This commit is contained in:
twinaphex 2016-06-01 04:09:59 +02:00
parent da6ac4aae7
commit bc3eb34da5
2 changed files with 12 additions and 17 deletions

View File

@ -2530,7 +2530,6 @@ bool config_save_file(const char *path)
{
float msg_color;
unsigned i = 0;
bool tmp_bool = false;
bool ret = false;
config_file_t *conf = config_file_new(path);
settings_t *settings = config_get_ptr();

View File

@ -1016,27 +1016,23 @@ bool rpng_iterate_image(rpng_t *rpng)
break;
case PNG_CHUNK_tRNS:
{
unsigned entries = chunk.size / 3;
if (rpng->has_idat)
goto error;
if (rpng->has_idat)
if (rpng->ihdr.color_type == PNG_IHDR_COLOR_PLT)
{
/* we should compare with the number of palette entries */
if (chunk.size > 256)
goto error;
if (rpng->ihdr.color_type == PNG_IHDR_COLOR_PLT)
{
/* we should compare with the number of palette entries */
if (chunk.size > 256)
goto error;
buf += 8;
buf += 8;
if (!png_read_trns(buf, rpng->palette, chunk.size))
goto error;
}
/* TODO: support colorkey in grayscale and truecolor images */
rpng->has_trns = true;
if (!png_read_trns(buf, rpng->palette, chunk.size))
goto error;
}
/* TODO: support colorkey in grayscale and truecolor images */
rpng->has_trns = true;
break;
case PNG_CHUNK_IDAT: