Commits

Russ Cox  committed bbe2adf

fix gcc 4.7 warnings (thanks Tuncer Ayaz)

R=rsc
http://codereview.appspot.com/6744053

  • Participants
  • Parent commits 976dfae

Comments (0)

Files changed (14)

File src/cmd/acidtypes/stabs.c

 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++){
 			if(sym.name){
 				if(sym.name[0] && sym.name[strlen(sym.name)-1] == '/')
 					dir = sym.name;
-				else
-					file = sym.name;
 			}
 			denumber();
 			fstack = nil;

File src/cmd/acme/rows.c

 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;

File src/cmd/acme/wind.c

 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;
 
 
 	/* 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);

File src/cmd/auth/dsagen.c

 main(int argc, char **argv)
 {
 	char *s;
-	int bits;
 	char *tag;
 	DSApriv *key;
 
-	bits = 1024;
 	tag = nil;
 	key = nil;
 	fmtinstall('B', mpfmt);

File src/cmd/auth/factotum/p9cr.c

 		astype = AuthChal;
 		challen = NETCHLEN;
 	}else if(c->proto == &vnc){
-		astype = AuthVNC;
 		challen = MAXCHAL;
 	}else{
 		werrstr("bad proto");

File src/cmd/devdraw/x11-get.c

 void
 _xputxdata(Memimage *m, Rectangle r)
 {
-	int offset, x, y;
+	int x, y;
 	uchar *p;
 	Point tp, xdelta, delta;
 	Xmem *xm;
 
 	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);
 

File src/cmd/ndb/dn.c

 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--;
 	dnageall(0);
 
 	/* let others back in */
-	lastclean = now;
 	needrefresh = 0;
 	dnvars.mutex = 0;
 }

File src/cmd/page/rotate.c

 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;

File src/cmd/pic/linegen.c

 	double dx[500], dy[500];
 	int ndxy;
 	double nx, ny;
-	Attr *ap, *chop_ap[4];
+	Attr *ap;
 
 	nx = curx;
 	ny = cury;
 				else
 					chop2 = ap->a_val.f;
 			}
-			chop_ap[chop++] = ap;
 			break;
 		case FILL:
 			battr |= FILLBIT;

File src/cmd/pic/textgen.c

 	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;
 		cury = y1;
 	else
 		cury = y0;
-	prevh = h;
-	prevw = w;
 	return(p);
 }
 

File src/cmd/venti/srv/mirrorarenas.c

 void
 setstatus(int bits)
 {
-	static int startindx = -1, endindx;
+	static int startindx = -1;
 	static char *startname, *endname;
 	static int lastbits;
 	char buf[100];
 		}
 		lastbits = bits;
 		startindx = tagindx;
-		endindx = tagindx;
 		startname = tagname;
 		endname = tagname;
 	} else {
-		endindx = tagindx;
 		endname = tagname;
 	}
 	if(bits < 0) {
 		startindx = -1;
-		endindx = -1;
 		return;
 	}	
 }

File src/libsunrpc/nfs3.c

 }
 
 static struct {
-	SunStatus status;
+	Nfs3Status status;
 	char *msg;
 } etab[] = {
 	Nfs3ErrNotOwner,	"not owner",

File src/libsunrpc/udp.c

 static void
 sunudpwrite(void *v)
 {
-	uchar *buf;
 	Arg arg = *(Arg*)v;
 	SunMsgUdp *msg;
 
 	sendp(arg.csync, 0);
 
-	buf = emalloc(UdpMaxRead);
 	while((msg = recvp(arg.creply)) != nil){
 		if(udpwrite(arg.fd, &msg->udp, msg->msg.data, msg->msg.count) != msg->msg.count)
 			fprint(2, "udpwrite: %r\n");

File src/libthread/iorw.c

 	int fd;
 	void *a;
 	int n;
-	int r;
 
 	fd = va_arg(*arg, int);
 	a = va_arg(*arg, void*);
 	n = va_arg(*arg, int);
-	r = read9pmsg(fd, a, n);
+	read9pmsg(fd, a, n);
 	return n;
 }
 int