From 2d23afb54eb63f7511b16ecb17e5b90f841b2966 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 18 Nov 2011 23:46:27 -0800 Subject: Make dpy a local variable instead of a global Fixes many gcc -Wshadow warnings Signed-off-by: Alan Coopersmith --- xcompmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xcompmgr.c') 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); } -- cgit v1.2.3-70-g09d2