silence more warnings

R=rsc
http://codereview.appspot.com/6744056
This commit is contained in:
Russ Cox 2012-10-21 12:04:56 -04:00
parent b0ae8a46a0
commit c5bfba483f
15 changed files with 279 additions and 271 deletions

View file

@ -497,7 +497,7 @@ void
xls(int argc, char **argv)
{
char *err, *name, *xname, *f[4], buf[4096];
int nf, i, j, l, sort;
int i, j, l, sort;
int lflag, dflag, tflag, n, len[4];
Dir *d;
CFid *fid;
@ -569,7 +569,7 @@ xls(int argc, char **argv)
d[i].dev = 0;
snprint(buf, sizeof buf, "%d %s %s %lld",
d[i].dev, d[i].uid, d[i].gid, d[i].length);
nf = getfields(buf, f, 4, 0, " ");
getfields(buf, f, 4, 0, " ");
for(j=0; j<4; j++){
l = strlen(f[j]);
if(l > len[j])

View file

@ -337,6 +337,7 @@ parsedefn(char *p, Type *t, char **pp)
oops();
sign = (*p == 's');
p++;
ischar = 0;
if(*p == 'c'){
ischar = 1;
p++;
@ -353,6 +354,8 @@ parsedefn(char *p, Type *t, char **pp)
t->printfmt = 'd';
else
t->printfmt = 'x';
USED(bits);
USED(ischar);
break;
case 'R': /* fp type */
n = parseint(&p);

View file

@ -270,7 +270,7 @@ moon(void)
* planetary terms in parallax
*/
spterms = spterms;
//spterms = spterms;
/*
* computation of longitude

View file

@ -65,6 +65,7 @@ p9crclient(Conv *c)
res = nil;
ret = -1;
attr = c->attr;
astype = -1;
if(c->proto == &p9cr){
astype = AuthChal;
@ -131,6 +132,7 @@ p9crclient(Conv *c)
ret = 0;
out:
USED(astype);
keyclose(k);
if(c->attr != attr)
freeattr(attr);

View file

@ -164,7 +164,6 @@ getdsakey(int argc, char **argv, int needprivate, Attr **pa)
char *file, *s, *p;
DSApriv *key;
Biobuf *b;
int regen;
Attr *a;
if(argc == 0)
@ -190,7 +189,6 @@ getdsakey(int argc, char **argv, int needprivate, Attr **pa)
return nil;
}
regen = 0;
a = _parseattr(s+4);
if(a == nil){
werrstr("empty key");

View file

@ -973,6 +973,7 @@ runmsg(Aconn *a)
case SSH_AGENTC_RSA_CHALLENGE:
n = get4(&m);
USED(n);
ek = getmp(&m);
mod = getmp(&m);
chal = getmp(&m);

View file

@ -87,12 +87,12 @@ extern void bz_internal_error ( int errcode );
#define AssertH(cond,errcode) \
{ if (!(cond)) bz_internal_error ( errcode ); }
#define AssertD(cond,msg) /* */
#define VPrintf0(zf) /* */
#define VPrintf1(zf,za1) /* */
#define VPrintf2(zf,za1,za2) /* */
#define VPrintf3(zf,za1,za2,za3) /* */
#define VPrintf4(zf,za1,za2,za3,za4) /* */
#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */
#define VPrintf0(zf) USED(zf)
#define VPrintf1(zf,za1) do { USED(zf); USED(za1); } while(0)
#define VPrintf2(zf,za1,za2) do { USED(zf); USED(za1); USED(za2); } while(0)
#define VPrintf3(zf,za1,za2,za3) do { USED(zf); USED(za1); USED(za2); USED(za3); } while(0)
#define VPrintf4(zf,za1,za2,za3,za4) do { USED(zf); USED(za1); USED(za2); USED(za3); USED(za4); } while(0)
#define VPrintf5(zf,za1,za2,za3,za4,za5) do { USED(zf); USED(za1); USED(za2); USED(za3); USED(za4); USED(za5); } while(0)
#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
#define BZFREE(ppp) (strm->bzfree)(strm->opaque,(ppp))

View file

@ -171,6 +171,8 @@ readpsfontdesc(char *fontname, int trindex) {
startchar = RUNEGETCHAR(start);
endfont = RUNEGETGROUP(end);
endchar = RUNEGETCHAR(end);
USED(startchar);
USED(endchar);
pfid = findpfn(psfontnam, 1);
if (startfont != endfont) {
error(WARNING, "font descriptions must not cross 256 glyph block boundary\n");

View file

@ -172,6 +172,7 @@ main(int argc, char *argv[])
default:
usage();
}ARGEND
USED(defmnt);
if(pipe(p) < 0)
error("pipe failed");

View file

@ -8,8 +8,6 @@ textgen(void)
int i, sub, nstr, at, with, hset;
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 = 0;
@ -90,8 +88,6 @@ textgen(void)
cury = y1;
else
cury = y0;
prevh = h;
prevw = w;
return(p);
}

View file

@ -163,7 +163,7 @@ void n_setwd(void)
int delim, emsz, k;
int savhp, savapts, savapts1, savfont, savfont1, savpts, savpts1;
base = numtabp[ST].val = numtabp[ST].val = wid = numtabp[CT].val = 0;
base = numtabp[ST].val = numtabp[SB].val = wid = numtabp[CT].val = 0;
if (ismot(i = getch()))
return;
delim = cbits(i);

View file

@ -217,11 +217,15 @@ void xbits(Tchar i, int bitf)
Tchar t_setch(int c)
{
#ifndef UNICODE
int j;
#endif
char temp[50];
char *s;
#ifndef UNICODE
j = 0;
#endif
s = temp;
if (c == '(') { /* \(xx */
if ((*s++ = getach()) == 0 || (*s++ = getach()) == 0)
@ -711,9 +715,8 @@ char *strdupl(const char *s) /* make a copy of s */
int
setfp(int pos, int f, char *truename, int print) /* mount font f at position pos[0...nfonts] */
{
char pathname[NS], shortname[NS], *sl;
char pathname[NS], shortname[NS];
sl = (char*)0;
zapwcache(0);
if (truename)
strcpy(shortname, truename);

View file

@ -682,6 +682,7 @@ vacstat(VacFile *parent, VacDir *vd, uchar *p, int np)
if(ext == nil)
return 0;
n = vacfileread(vf, ext, size, 0);
USED(n);
ext[size] = 0;
vacfiledecref(vf);
if(vd->mode & ModeLink){

View file

@ -4536,6 +4536,7 @@ validptr(void* p)
static char c;
c = *((char*)p);
USED(c);
return 1;
}

View file

@ -120,7 +120,7 @@ nfs3errstr(Nfs3Status status)
int i;
for(i=0; i<nelem(etab); i++){
if(etab[i].status == status){
if((int)etab[i].status == (int)status){
werrstr(etab[i].msg);
return;
}