Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
This commit is contained in:
parent
226d80b821
commit
cbeb0b26e4
492 changed files with 3218 additions and 3167 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ extern void mount3proc(void*);
|
|||
|
||||
enum
|
||||
{
|
||||
MaxDataSize = 8192,
|
||||
MaxDataSize = 8192
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
enum
|
||||
{
|
||||
MAXQ = 256,
|
||||
MAXQ = 256
|
||||
};
|
||||
|
||||
typedef struct Queue Queue;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
enum
|
||||
{
|
||||
STACK = 32768,
|
||||
STACK = 32768
|
||||
};
|
||||
|
||||
typedef struct WriteReq WriteReq;
|
||||
|
|
|
|||
|
|
@ -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*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(); */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue