Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.

This commit is contained in:
rsc 2006-04-01 19:24:03 +00:00
parent 226d80b821
commit cbeb0b26e4
492 changed files with 3218 additions and 3167 deletions

View file

@ -117,22 +117,22 @@ readconfigfile(char *name, VtCache *vcache)
nf = tokenize(p, f, nelem(f));
if(nf != 3){
fprint(2, "%s:%d: syntax error\n", name, line);
// ok = 0;
/* ok = 0; */
continue;
}
if(vtparsescore(f[1], &pref, score) < 0){
fprint(2, "%s:%d: bad score '%s'\n", name, line, f[1]);
// ok = 0;
/* ok = 0; */
continue;
}
if(f[0][0] != '/'){
fprint(2, "%s:%d: unrooted path '%s'\n", name, line, f[0]);
// ok = 0;
/* ok = 0; */
continue;
}
if(addpath(c, f[0], score, strtoul(f[2], 0, 0)) < 0){
fprint(2, "%s:%d: %s: %r\n", name, line, f[0]);
// ok = 0;
/* ok = 0; */
continue;
}
}

View file

@ -11,6 +11,6 @@ extern void mount3proc(void*);
enum
{
MaxDataSize = 8192,
MaxDataSize = 8192
};

View file

@ -1,6 +1,6 @@
enum
{
MAXQ = 256,
MAXQ = 256
};
typedef struct Queue Queue;

View file

@ -43,7 +43,7 @@
enum
{
STACK = 32768,
STACK = 32768
};
typedef struct WriteReq WriteReq;

View file

@ -42,7 +42,7 @@ Cmd cmdtab[] =
"pwd", cmdpwd, "pwd - print working directory",
"help", cmdhelp, "help - print usage summaries",
"block", cmdblock, "block path offset - print disk offset of path's byte offset",
"disk", cmddisk, "disk offset count - dump disk contents",
"disk", cmddisk, "disk offset count - dump disk contents"
};
char*

View file

@ -15,7 +15,7 @@ int handlelen = 20;
uchar handle[64] = {
/* SHA1("/") */
0x42, 0x09, 0x9B, 0x4A, 0xF0, 0x21, 0xE5, 0x3F, 0xD8, 0xFD,
0x4E, 0x05, 0x6C, 0x25, 0x68, 0xD7, 0xC2, 0xE3, 0xFF, 0xA8,
0x4E, 0x05, 0x6C, 0x25, 0x68, 0xD7, 0xC2, 0xE3, 0xFF, 0xA8
};
void

View file

@ -233,7 +233,7 @@ enum
RandSize = 16,
SessidSize = 8,
HeaderSize = RandSize+SessidSize,
MaxHandleSize = Nfs3MaxHandleSize - HeaderSize,
MaxHandleSize = Nfs3MaxHandleSize - HeaderSize
};
AESstate aesstate;
@ -342,7 +342,7 @@ enum
{
/* sizes used in handles; see nfs server below */
CnodeHandleSize = 8,
FsysHandleOffset = CnodeHandleSize,
FsysHandleOffset = CnodeHandleSize
};
/*
@ -588,7 +588,7 @@ parseipandmask(char *s, uchar *ip, uchar *mask)
if(*p != '/')
*--p = '/';
}
//fprint(2, "parseipandmask %s => %I %I\n", s, ip, mask);
/*fprint(2, "parseipandmask %s => %I %I\n", s, ip, mask); */
return 0;
}
@ -863,7 +863,7 @@ timerthread(void *v)
{
for(;;){
recvp(timerchan);
// refreshconfig();
/* refreshconfig(); */
}
}