From a9218c958e992adb727ea5fe45cb04f9ba611de1 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 23 Feb 2013 08:45:48 -0800 Subject: Move dpy declaration from static to main() function Fixes gcc warnings: xhost.c:290: warning: declaration of 'dpy' shadows a global declaration xhost.c:160: warning: shadowed declaration is here xhost.c:839: warning: declaration of 'dpy' shadows a global declaration xhost.c:160: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith --- xhost.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xhost.c b/xhost.c index 558d6da..abbfcc1 100644 --- a/xhost.c +++ b/xhost.c @@ -157,8 +157,6 @@ XFamily(int af) } #endif /* NEEDSOCKETS */ -static Display *dpy; - int main(int argc, char *argv[]) { @@ -168,6 +166,7 @@ main(int argc, char *argv[]) int nfailed = 0; XHostAddress *list; Bool enabled = False; + Display *dpy; ProgramName = argv[0]; -- cgit v1.2.3