diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-18 23:46:27 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-18 23:46:27 -0800 |
commit | 2d23afb54eb63f7511b16ecb17e5b90f841b2966 (patch) | |
tree | 53583547768470e47bf063d1091359b0cb0dcc0e | |
parent | 2a40523ef8c658703eae3d17732e76298abf48e5 (diff) |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } |