diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-04-29 18:07:52 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-04-29 18:07:52 +0100 |
commit | 4efa0dd16c42d89cb722ca7a482e37afe4430f97 (patch) | |
tree | afd1eb65313fb8f60d6d4c4dc2c3a1e8a5cbb67f | |
parent | c975e024efe3ce4811c167d66a8cb4e1627adcc0 (diff) | |
download | gdk-pixbuf-4efa0dd16c42d89cb722ca7a482e37afe4430f97.tar.gz |
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.
-rw-r--r-- | 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 dfde1aeaf..eeb1559e1 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; |