about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Carluer <vince@bitfu.io>2018-01-04 12:27:37 +0000
committerHiltjo Posthuma <hiltjo@codemadness.org>2018-01-04 18:14:41 +0100
commit84a1bc5d0d6b54eb23268e8f02a787be9ccbd919 (patch)
tree44fb195236b76a31ef11f8b1d0094fba7a54a2fa
parentdrw: drw_scm_create: use Clr type (diff)
downloaddmenu-84a1bc5d0d6b54eb23268e8f02a787be9ccbd919.tar.gz
dmenu-84a1bc5d0d6b54eb23268e8f02a787be9ccbd919.tar.bz2
dmenu-84a1bc5d0d6b54eb23268e8f02a787be9ccbd919.zip
Instantiate j var outside #ifdef XINEMARA directive because it is used in loop outside directive
Diffstat (limited to '')
-rw-r--r--dmenu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dmenu.c b/dmenu.c
index eae5685..3c261c0 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -541,7 +541,7 @@ run(void)
 static void
 setup(void)
 {
-	int x, y, i = 0;
+	int x, y, i, j = 0;
 	unsigned int du;
 	XSetWindowAttributes swa;
 	XIM xim;
@@ -551,9 +551,8 @@ setup(void)
 #ifdef XINERAMA
 	XineramaScreenInfo *info;
 	Window pw;
-	int a, j, di, n, area = 0;
+	int a, di, n, area = 0;
 #endif
-
 	/* init appearance */
 	for (j = 0; j < SchemeLast; j++)
 		scheme[j] = drw_scm_create(drw, colors[j], 2);