[gdk-pixbuf] Silence two compiler warnings
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] Silence two compiler warnings
- Date: Sun, 29 Apr 2018 17:13:33 +0000 (UTC)
commit 4efa0dd16c42d89cb722ca7a482e37afe4430f97
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Apr 29 18:07:52 2018 +0100
Silence two compiler warnings
We have two "set but unused variable" warnings coming from
gdk-pixbuf-xlib. The first is caused by an unnecessary variable used to
hold the return value of XGetWindowAttributes(); we don't do anything
with it, and it's way too late for changing the behaviour of the
function to bail out on error. The second is caused by a variable that
is only used when a debugging printf() is compiled in; to avoid the
warning without creating even more complex macro hell, we tell the
compiler that the variable is unused.
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
index dfde1ae..eeb1559 100644
--- a/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
+++ b/contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlibrgb.c
@@ -664,10 +664,9 @@ xlib_rgb_choose_visual_for_xprint (int aDepth)
int i;
XWindowAttributes win_att;
- Status ret_stat;
Visual *root_visual;
- ret_stat = XGetWindowAttributes(image_info->display,
+ XGetWindowAttributes(image_info->display,
RootWindow(image_info->display, image_info->screen_num),
&win_att);
root_visual = win_att.visual;
@@ -712,7 +711,7 @@ xlib_rgb_set_gray_cmap (Colormap cmap)
{
int i;
XColor color;
- int status;
+ Status status G_GNUC_UNUSED;
unsigned long pixels[256];
int r, g, b, gray;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]