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
|
|
@ -22,10 +22,10 @@ enum {
|
|||
BioReading,
|
||||
BioWriting,
|
||||
BioEmpty,
|
||||
BioVentiError,
|
||||
BioVentiError
|
||||
};
|
||||
enum {
|
||||
BadHeap = ~0,
|
||||
BadHeap = ~0
|
||||
};
|
||||
struct VtCache
|
||||
{
|
||||
|
|
@ -159,7 +159,7 @@ cachecheck(VtCache *c)
|
|||
}
|
||||
if(c->nheap + refed != c->nblock){
|
||||
fprint(2, "cachecheck: nheap %d refed %d nblocks %d\n", c->nheap, refed, c->nblock);
|
||||
//vtcachedump(c);
|
||||
/*vtcachedump(c); */
|
||||
}
|
||||
assert(c->nheap + refed == c->nblock);
|
||||
refed = 0;
|
||||
|
|
@ -488,7 +488,7 @@ if(0)fprint(2, "vtblockput: %d: %x %d %d\n", getpid(), b->addr, c->nheap, b->ios
|
|||
assert(b->ref == 0);
|
||||
switch(b->iostate){
|
||||
case BioVenti:
|
||||
//if(b->addr != NilBlock) print("blockput %d\n", b->addr);
|
||||
/*if(b->addr != NilBlock) print("blockput %d\n", b->addr); */
|
||||
b->used = c->now++;
|
||||
case BioVentiError:
|
||||
heapins(b);
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ blockwalk(VtBlock *p, int index, VtCache *c, int mode, VtEntry *e)
|
|||
score = p->data+index*VtScoreSize;
|
||||
break;
|
||||
}
|
||||
//print("walk from %V/%d ty %d to %V ty %d\n", p->score, index, p->type, score, type);
|
||||
/*print("walk from %V/%d ty %d to %V ty %d\n", p->score, index, p->type, score, type); */
|
||||
|
||||
if(mode == VtOWRITE && vtglobaltolocal(score) == NilBlock){
|
||||
b = vtcacheallocblock(c, type);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ static char Eremoved[] = "[removed]";
|
|||
enum
|
||||
{ /* defaults */
|
||||
LogChunkSize = 8192,
|
||||
LogSize = 65536,
|
||||
LogSize = 65536
|
||||
};
|
||||
|
||||
static struct {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
enum {
|
||||
IdealAlignment = 32,
|
||||
ChunkSize = 128*1024,
|
||||
ChunkSize = 128*1024
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ typedef struct Frag Frag;
|
|||
enum {
|
||||
BigMemSize = MaxFragSize,
|
||||
SmallMemSize = BigMemSize/8,
|
||||
NLocalFrag = 2,
|
||||
NLocalFrag = 2
|
||||
};
|
||||
|
||||
/* position to carve out of a Mem */
|
||||
enum {
|
||||
PFront,
|
||||
PMiddle,
|
||||
PEnd,
|
||||
PEnd
|
||||
};
|
||||
|
||||
struct Mem
|
||||
|
|
@ -33,7 +33,7 @@ struct Mem
|
|||
enum {
|
||||
FragLocalFree,
|
||||
FragLocalAlloc,
|
||||
FragGlobal,
|
||||
FragGlobal
|
||||
};
|
||||
|
||||
struct Frag
|
||||
|
|
@ -126,7 +126,7 @@ packetalloc(void)
|
|||
p->next = nil;
|
||||
p->pc = getcallerpc((char*)&p+8); /* might not work, but fine */
|
||||
|
||||
//if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4));
|
||||
/*if(0)fprint(2, "packetalloc %p from %08lux %08lux %08lux\n", p, *((uint*)&p+2), *((uint*)&p+3), *((uint*)&p+4)); */
|
||||
|
||||
NOTFREE(p);
|
||||
return p;
|
||||
|
|
@ -137,7 +137,7 @@ packetfree(Packet *p)
|
|||
{
|
||||
Frag *f, *ff;
|
||||
|
||||
//if(1)fprint(2, "packetfree %p from %08lux\n", p, getcallerpc(&p));
|
||||
/*if(1)fprint(2, "packetfree %p from %08lux\n", p, getcallerpc(&p)); */
|
||||
|
||||
if(p == nil)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
enum
|
||||
{
|
||||
STACK = 8192,
|
||||
STACK = 8192
|
||||
};
|
||||
|
||||
typedef struct VtSconn VtSconn;
|
||||
|
|
@ -93,7 +93,7 @@ listenproc(void *v)
|
|||
proccreate(connproc, sc, STACK);
|
||||
}
|
||||
|
||||
// hangup
|
||||
/* hangup */
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue