]> git.sur5r.net Git - i3/i3/blobdiff - src/xinerama.c
Fix clang -Wextra except -Wunused-parameter.
[i3/i3] / src / xinerama.c
index c116deaa954fb0bd709a1e5ec44a23c0f1b5e7a9..b3e51ac535ae8f628f8e52d3bd33a9c35115b5e9 100644 (file)
@@ -1,21 +1,20 @@
+#undef I3__FILE__
+#define I3__FILE__ "xinerama.c"
 /*
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- *
- * © 2009-2011 Michael Stapelberg and contributors
- *
- * See file LICENSE for license information.
+ * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * This is LEGACY code (we support RandR, which can do much more than
  * Xinerama), but necessary for the poor users of the nVidia binary
- * driver which does not support RandR in 2010 *sigh*.
+ * driver which does not support RandR in 2011 *sigh*.
  *
  */
+#include "all.h"
 
 #include <xcb/xinerama.h>
 
-#include "all.h"
 
 static int num_screens;
 
@@ -23,7 +22,7 @@ static int num_screens;
  * Looks in outputs for the Output whose start coordinates are x, y
  *
  */
-static Output *get_screen_at(int x, int y) {
+static Output *get_screen_at(unsigned int x, unsigned int y) {
     Output *output;
     TAILQ_FOREACH(output, &outputs, outputs)
         if (output->rect.x == x && output->rect.y == y)
@@ -59,7 +58,7 @@ static void query_screens(xcb_connection_t *conn) {
             s->rect.height = min(s->rect.height, screen_info[screen].height);
         } else {
             s = scalloc(sizeof(Output));
-            asprintf(&(s->name), "xinerama-%d", num_screens);
+            sasprintf(&(s->name), "xinerama-%d", num_screens);
             DLOG("Created new Xinerama screen %s (%p)\n", s->name, s);
             s->active = true;
             s->rect.x = screen_info[screen].x_org;
@@ -93,7 +92,7 @@ static void query_screens(xcb_connection_t *conn) {
  * information to setup workspaces for each screen.
  *
  */
-void xinerama_init() {
+void xinerama_init(void) {
     if (!xcb_get_extension_data(conn, &xcb_xinerama_id)->present) {
         DLOG("Xinerama extension not found, disabling.\n");
         disable_randr(conn);