From: Michael Stapelberg Date: Tue, 15 Sep 2009 14:58:10 +0000 (+0200) Subject: Make gcc happy about some possibly uninitialized variables (Thanks badboy) X-Git-Tag: 3.d~91 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=775d3a0d9152699118a03aa8207e247a89f3082b;p=i3%2Fi3 Make gcc happy about some possibly uninitialized variables (Thanks badboy) This warning only showed up with CFLAGS=-O2. The variables in question could never be uninitialized because they were definitely set, have a look at the code. But anyways, less warnings is always a good thing ;-). --- diff --git a/src/handlers.c b/src/handlers.c index 5d171403..516bb88a 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -408,7 +408,7 @@ int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_ to_bottom = client->rect.height - event->event_y; resize_orientation_t orientation = O_VERTICAL; Container *con = client->container; - int first, second; + int first = 0, second = 0; LOG("click was %d px to the right, %d px to the left, %d px to top, %d px to bottom\n", to_right, to_left, to_top, to_bottom);