[gdk-pixbuf] gif: Fix compiler warning reg. type conversion
- From: Tobias Mueller <tobiasmue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] gif: Fix compiler warning reg. type conversion
- Date: Thu, 24 Aug 2017 07:16:30 +0000 (UTC)
commit 853c60427f7ebb6b9cdfd142923167af70f13536
Author: Tobias Mueller <muelli cryptobitch de>
Date: Tue Aug 1 22:37:35 2017 +0100
gif: Fix compiler warning reg. type conversion
With -Wconversion gcc complains with the following warning:
io-gif.c: In function ‘gif_read’:
io-gif.c:246:20: warning: conversion to ‘guint {aka unsigned int}’ from
‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
context->ptr += len;
^
io-gif.c:258:28: warning: conversion to ‘guint {aka unsigned int}’ from
‘size_t {aka long unsigned int}’ may alter its value [-Wconversion]
context->amount_needed = len - (context->size - context->ptr);
This change simply changes their types to match the rhs.
https://bugzilla.gnome.org/show_bug.cgi?id=786261
gdk-pixbuf/io-gif.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c
index 4efd00a..057960c 100644
--- a/gdk-pixbuf/io-gif.c
+++ b/gdk-pixbuf/io-gif.c
@@ -142,9 +142,9 @@ struct _GifContext
GdkPixbufModuleUpdatedFunc update_func;
gpointer user_data;
guchar *buf;
- guint ptr;
- guint size;
- guint amount_needed;
+ gsize ptr;
+ gsize size;
+ gsize amount_needed;
/* extension context */
guchar extension_label;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]