[hackers] [wmii] Fix warnings in optimized compile. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Thu, 1 Oct 2009 20:44:06 +0000 (UTC)

changeset: 2501:d3f4d31bdce5
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Oct 01 16:42:54 2009 -0400
files: cmd/menu/history.c cmd/menu/menu.c cmd/wmii/_util.c cmd/wmii/bar.c cmd/wmii/mouse.c cmd/wmii/screen.c cmd/wmiir.c
description:
Fix warnings in optimized compile.

diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/menu/history.c
--- a/cmd/menu/history.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/menu/history.c Thu Oct 01 16:42:54 2009 -0400
@@ -51,6 +51,7 @@
         Item *h, *first;
         int i, n, fd;
 
+ SET(first);
         if(fork() != 0)
                 return;
 
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/menu/menu.c
--- a/cmd/menu/menu.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/menu/menu.c Thu Oct 01 16:42:54 2009 -0400
@@ -138,6 +138,7 @@
         pad = (font->height & ~1);
 
         rd = r;
+ rp = ZR; // SET(rp)
         if (prompt) {
                 if (!promptw)
                         promptw = textwidth(font, prompt) + 2 * ltwidth;
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/wmii/_util.c
--- a/cmd/wmii/_util.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/wmii/_util.c Thu Oct 01 16:42:54 2009 -0400
@@ -141,11 +141,11 @@
         int fd[3], p[2];
         int status, cmdfd;
 
+ gdbcmd = estrdup("/tmp/gdbcmd.XXXXXX");
         if(pipe(p) < 0)
                 goto done;
         closeexec(p[0]);
 
- gdbcmd = estrdup("/tmp/gdbcmd.XXXXXX");
         cmdfd = mkstemp(gdbcmd);
         if(cmdfd < 0)
                 goto done;
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/wmii/bar.c
--- a/cmd/wmii/bar.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/wmii/bar.c Thu Oct 01 16:42:54 2009 -0400
@@ -90,6 +90,7 @@
         strlcat(b->buf, " ", sizeof(b->buf));
         strlcat(b->buf, b->text, sizeof(b->buf));
         
+ SET(i);
         for(sp=screens; (s = *sp); sp++) {
                 i = bp - s->bar;
                 if(i < nelem(s->bar))
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/wmii/mouse.c Thu Oct 01 16:42:54 2009 -0400
@@ -219,6 +219,7 @@
 
         v = selview;
         d = divs;
+ SET(a);
         foreach_column(v, s, a) {
                 if(a == f->area)
                         break;
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/wmii/screen.c
--- a/cmd/wmii/screen.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/wmii/screen.c Thu Oct 01 16:42:54 2009 -0400
@@ -87,6 +87,7 @@
         int i, best, d;
 
         SET(d);
+ SET(best);
         for(i=0; i < vec->n; i++) {
                 p = vec->ary[i];
                 r = key(p);
@@ -112,7 +113,7 @@
 void*
 findthing(Rectangle rect, int direction, Vector_ptr *vec, Rectangle (*key)(void*), bool wrap) {
         Rectangle isect;
- Rectangle r, bestisect, bestr;
+ Rectangle r, bestisect = {0,}, bestr = {0,};
         void *best, *p;
         int i, n;
 
diff -r 2001bd74c8e0 -r d3f4d31bdce5 cmd/wmiir.c
--- a/cmd/wmiir.c Thu Oct 01 00:23:27 2009 -0400
+++ b/cmd/wmiir.c Thu Oct 01 16:42:54 2009 -0400
@@ -260,6 +260,7 @@
                 usage();
         }ARGEND;
 
+ count = 0;
         file = EARGF(usage());
         do {
                 stat = ixp_stat(client, file);
Received on Thu Oct 01 2009 - 20:44:06 UTC

This archive was generated by hypermail 2.2.0 : Thu Oct 01 2009 - 20:48:05 UTC