aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2012-10-20 13:36:52 -0400
committerRuss Cox <rsc@swtch.com>2012-10-20 13:36:52 -0400
commit220c15d2b746878a943f311e6f66b1480e46491d (patch)
treeb3235ff00e75b08680c0db754058ec908e2b2f22 /src/cmd
parent53527a6e7864f5d681d7140f1403d4d8d42311d5 (diff)
downloadplan9port-220c15d2b746878a943f311e6f66b1480e46491d.tar.gz
plan9port-220c15d2b746878a943f311e6f66b1480e46491d.tar.bz2
plan9port-220c15d2b746878a943f311e6f66b1480e46491d.zip
fix gcc 4.7 warnings (thanks Tuncer Ayaz)
R=rsc http://codereview.appspot.com/6744053
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/acidtypes/stabs.c5
-rw-r--r--src/cmd/acme/rows.c4
-rw-r--r--src/cmd/acme/wind.c4
-rw-r--r--src/cmd/auth/dsagen.c2
-rw-r--r--src/cmd/auth/factotum/p9cr.c1
-rw-r--r--src/cmd/devdraw/x11-get.c6
-rwxr-xr-xsrc/cmd/ndb/dn.c3
-rw-r--r--src/cmd/page/rotate.c5
-rw-r--r--src/cmd/pic/linegen.c3
-rw-r--r--src/cmd/pic/textgen.c4
-rw-r--r--src/cmd/venti/srv/mirrorarenas.c5
11 files changed, 7 insertions, 35 deletions
diff --git a/src/cmd/acidtypes/stabs.c b/src/cmd/acidtypes/stabs.c
index 862f9434..f86c99e3 100644
--- a/src/cmd/acidtypes/stabs.c
+++ b/src/cmd/acidtypes/stabs.c
@@ -603,14 +603,13 @@ int
stabs2acid(Stab *stabs, Biobuf *b)
{
volatile int fno, i;
- char c, *file, *desc, *p;
+ char c, *desc, *p;
char *volatile dir, *volatile fn, *volatile name;
Ftypes *f;
Type *t, *tt;
StabSym sym;
dir = nil;
- file = nil;
fno = 0;
fn = nil;
for(i=0; stabsym(stabs, i, &sym)>=0; i++){
@@ -621,8 +620,6 @@ stabs2acid(Stab *stabs, Biobuf *b)
if(sym.name){
if(sym.name[0] && sym.name[strlen(sym.name)-1] == '/')
dir = sym.name;
- else
- file = sym.name;
}
denumber();
fstack = nil;
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c
index c57a41b0..4f111ec3 100644
--- a/src/cmd/acme/rows.c
+++ b/src/cmd/acme/rows.c
@@ -102,12 +102,10 @@ rowadd(Row *row, Column *c, int x)
void
rowresize(Row *row, Rectangle r)
{
- int i, dx, odx, deltax;
+ int i, deltax;
Rectangle or, r1, r2;
Column *c;
- dx = Dx(r);
- odx = Dx(row->r);
or = row->r;
deltax = r.min.x - or.min.x;
row->r = r;
diff --git a/src/cmd/acme/wind.c b/src/cmd/acme/wind.c
index 378c3ccb..1022154d 100644
--- a/src/cmd/acme/wind.c
+++ b/src/cmd/acme/wind.c
@@ -181,7 +181,7 @@ wintaglines(Window *w, Rectangle r)
int
winresize(Window *w, Rectangle r, int safe, int keepextra)
{
- int oy, y, mouseintag, mouseinbody, tagresized;
+ int oy, y, mouseintag, mouseinbody;
Point p;
Rectangle r1;
@@ -203,9 +203,7 @@ winresize(Window *w, Rectangle r, int safe, int keepextra)
/* If needed, resize & redraw tag. */
y = r1.max.y;
- tagresized = 0;
if(!safe || !w->tagsafe || !eqrect(w->tag.all, r1)){
- tagresized = 1;
textresize(&w->tag, r1, TRUE);
y = w->tag.fr.r.max.y;
windrawbutton(w);
diff --git a/src/cmd/auth/dsagen.c b/src/cmd/auth/dsagen.c
index 58d59247..cb618ede 100644
--- a/src/cmd/auth/dsagen.c
+++ b/src/cmd/auth/dsagen.c
@@ -14,11 +14,9 @@ void
main(int argc, char **argv)
{
char *s;
- int bits;
char *tag;
DSApriv *key;
- bits = 1024;
tag = nil;
key = nil;
fmtinstall('B', mpfmt);
diff --git a/src/cmd/auth/factotum/p9cr.c b/src/cmd/auth/factotum/p9cr.c
index 85fa1583..0d9c4879 100644
--- a/src/cmd/auth/factotum/p9cr.c
+++ b/src/cmd/auth/factotum/p9cr.c
@@ -156,7 +156,6 @@ p9crserver(Conv *c)
astype = AuthChal;
challen = NETCHLEN;
}else if(c->proto == &vnc){
- astype = AuthVNC;
challen = MAXCHAL;
}else{
werrstr("bad proto");
diff --git a/src/cmd/devdraw/x11-get.c b/src/cmd/devdraw/x11-get.c
index 395f4555..1a47be01 100644
--- a/src/cmd/devdraw/x11-get.c
+++ b/src/cmd/devdraw/x11-get.c
@@ -56,7 +56,7 @@ _xgetxdata(Memimage *m, Rectangle r)
void
_xputxdata(Memimage *m, Rectangle r)
{
- int offset, x, y;
+ int x, y;
uchar *p;
Point tp, xdelta, delta;
Xmem *xm;
@@ -69,10 +69,6 @@ _xputxdata(Memimage *m, Rectangle r)
xi = xm->xi;
gc = m->chan==GREY1 ? _x.gccopy0 : _x.gccopy;
- if(m->depth == 24)
- offset = r.min.x & 3;
- else
- offset = r.min.x & (31/m->depth);
delta = subpt(r.min, m->r.min);
diff --git a/src/cmd/ndb/dn.c b/src/cmd/ndb/dn.c
index c9356b54..8b874030 100755
--- a/src/cmd/ndb/dn.c
+++ b/src/cmd/ndb/dn.c
@@ -462,8 +462,6 @@ getactivity(Request *req)
void
putactivity(void)
{
- static ulong lastclean;
-
if(traceactivity) syslog(0, "dns", "put %d by %d.%d", dnvars.active, getpid(), threadid());
lock(&dnvars.lk);
dnvars.active--;
@@ -490,7 +488,6 @@ putactivity(void)
dnageall(0);
/* let others back in */
- lastclean = now;
needrefresh = 0;
dnvars.mutex = 0;
}
diff --git a/src/cmd/page/rotate.c b/src/cmd/page/rotate.c
index 48087348..3ac83a1f 100644
--- a/src/cmd/page/rotate.c
+++ b/src/cmd/page/rotate.c
@@ -85,21 +85,18 @@ void
interlace(Image *im, Image *tmp, int axis, int n, Image *mask, int gran)
{
Point p0, p1;
- Rectangle r0, r1;
+ Rectangle r0;
r0 = im->r;
- r1 = im->r;
switch(axis) {
case Xaxis:
r0.max.x = n;
- r1.min.x = n;
p0 = (Point){gran, 0};
p1 = (Point){-gran, 0};
break;
case Yaxis:
default:
r0.max.y = n;
- r1.min.y = n;
p0 = (Point){0, gran};
p1 = (Point){0, -gran};
break;
diff --git a/src/cmd/pic/linegen.c b/src/cmd/pic/linegen.c
index eab268f5..e0db5fc6 100644
--- a/src/cmd/pic/linegen.c
+++ b/src/cmd/pic/linegen.c
@@ -20,7 +20,7 @@ obj *linegen(int type)
double dx[500], dy[500];
int ndxy;
double nx, ny;
- Attr *ap, *chop_ap[4];
+ Attr *ap;
nx = curx;
ny = cury;
@@ -133,7 +133,6 @@ obj *linegen(int type)
else
chop2 = ap->a_val.f;
}
- chop_ap[chop++] = ap;
break;
case FILL:
battr |= FILLBIT;
diff --git a/src/cmd/pic/textgen.c b/src/cmd/pic/textgen.c
index 98dfbb57..082f8ee0 100644
--- a/src/cmd/pic/textgen.c
+++ b/src/cmd/pic/textgen.c
@@ -7,8 +7,6 @@ obj *textgen(void)
int i, sub, nstr, at, with, hset, invis;
double xwith, ywith, h, w, x0, y0, x1, y1;
obj *p, *ppos;
- static double prevh = 0;
- static double prevw = 0;
Attr *ap;
at = with = nstr = hset = invis = 0;
@@ -93,8 +91,6 @@ obj *textgen(void)
cury = y1;
else
cury = y0;
- prevh = h;
- prevw = w;
return(p);
}
diff --git a/src/cmd/venti/srv/mirrorarenas.c b/src/cmd/venti/srv/mirrorarenas.c
index fd3e59b8..c0d02e65 100644
--- a/src/cmd/venti/srv/mirrorarenas.c
+++ b/src/cmd/venti/srv/mirrorarenas.c
@@ -63,7 +63,7 @@ enum
void
setstatus(int bits)
{
- static int startindx = -1, endindx;
+ static int startindx = -1;
static char *startname, *endname;
static int lastbits;
char buf[100];
@@ -91,16 +91,13 @@ setstatus(int bits)
}
lastbits = bits;
startindx = tagindx;
- endindx = tagindx;
startname = tagname;
endname = tagname;
} else {
- endindx = tagindx;
endname = tagname;
}
if(bits < 0) {
startindx = -1;
- endindx = -1;
return;
}
}