aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-18 23:46:27 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-18 23:46:27 -0800
commit2d23afb54eb63f7511b16ecb17e5b90f841b2966 (patch)
tree53583547768470e47bf063d1091359b0cb0dcc0e
parentAdd xext to PKG_CHECK_MODULES for calls of shape ext. functions in libXext (diff)
downloadxcman-2d23afb54eb63f7511b16ecb17e5b90f841b2966.tar.gz
xcman-2d23afb54eb63f7511b16ecb17e5b90f841b2966.tar.bz2
xcman-2d23afb54eb63f7511b16ecb17e5b90f841b2966.tar.xz
Make dpy a local variable instead of a global
Fixes many gcc -Wshadow warnings Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xcompmgr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xcompmgr.c b/xcompmgr.c
index 0ad23b5..6d2ef44 100644
--- a/xcompmgr.c
+++ b/xcompmgr.c
@@ -110,7 +110,6 @@ typedef struct _fade {
static win *list;
static fade *fades;
-static Display *dpy;
static int scr;
static Window root;
static Picture rootPicture;
@@ -1981,7 +1980,7 @@ usage (char *program)
}
static Bool
-register_cm (void)
+register_cm (Display *dpy)
{
Window w;
Atom a;
@@ -2034,6 +2033,7 @@ register_cm (void)
int
main (int argc, char **argv)
{
+ Display *dpy;
XEvent ev;
Window root_return, parent_return;
Window *children;
@@ -2157,7 +2157,7 @@ main (int argc, char **argv)
exit (1);
}
- if (!register_cm())
+ if (!register_cm(dpy))
{
exit (1);
}