From af1cd41b65b739bb9d17e7d517f5fcf3e99a6a40 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 5 Sep 2005 18:36:22 +0000 Subject: [PATCH] Remove unused variable pbuf_count. (#315282, Kjartan Maraas) 2005-09-05 Matthias Clasen * io-tga.c (parse_rle_data): Remove unused variable pbuf_count. (#315282, Kjartan Maraas) --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/io-tga.c | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 94b9ce539b..780ea49a1f 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +2005-09-05 Matthias Clasen + + * io-tga.c (parse_rle_data): Remove unused variable + pbuf_count. (#315282, Kjartan Maraas) + 2005-08-31 Matthias Clasen * Makefile.am (gdk-pixbuf-enum-types.c): Intern type diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c index d28cf09030..2cde75f767 100644 --- a/gdk-pixbuf/io-tga.c +++ b/gdk-pixbuf/io-tga.c @@ -632,18 +632,14 @@ static gboolean parse_rle_data(TGAContext *ctx, GError **err) { guint rows = 0; guint count = 0; - guint pbuf_count = 0; guint bytes_done_before = ctx->pbuf_bytes_done; - if (ctx->hdr->type == TGA_TYPE_RLE_PSEUDOCOLOR) { + + if (ctx->hdr->type == TGA_TYPE_RLE_PSEUDOCOLOR) count = parse_rle_data_pseudocolor(ctx); - pbuf_count = count * ctx->pbuf->n_channels; - } else if (ctx->hdr->type == TGA_TYPE_RLE_TRUECOLOR) { + else if (ctx->hdr->type == TGA_TYPE_RLE_TRUECOLOR) count = parse_rle_data_truecolor(ctx); - pbuf_count = count; - } else if (ctx->hdr->type == TGA_TYPE_RLE_GRAYSCALE) { + else if (ctx->hdr->type == TGA_TYPE_RLE_GRAYSCALE) count = parse_rle_data_grayscale(ctx); - pbuf_count = count * (ctx->pbuf->n_channels == 4 ? 2 : 3); - } if (ctx->hdr->flags & TGA_ORIGIN_RIGHT) { guchar *row = ctx->pbuf->pixels + (bytes_done_before / ctx->pbuf->rowstride) * ctx->pbuf->rowstride;