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

@ -23,16 +23,16 @@
#include "dat.h"
#include "fns.h"
//static int bucklook(u8int *score, int type, u8int *data, int n);
//static int writebucket(ISect *is, u32int buck, IBucket *ib, DBlock *b);
//static int okibucket(IBucket *ib, ISect *is);
/*static int bucklook(u8int *score, int type, u8int *data, int n); */
/*static int writebucket(ISect *is, u32int buck, IBucket *ib, DBlock *b); */
/*static int okibucket(IBucket *ib, ISect *is); */
static int initindex1(Index*);
static ISect *initisect1(ISect *is);
//static int splitiblock(Index *ix, DBlock *b, ISect *is, u32int buck, IBucket *ib);
/*static int splitiblock(Index *ix, DBlock *b, ISect *is, u32int buck, IBucket *ib); */
#define KEY(k,d) ((d) ? (k)>>(32-(d)) : 0)
//static QLock indexlock; //ZZZ
/*static QLock indexlock; //ZZZ */
static char IndexMagic[] = "venti index configuration";
@ -457,9 +457,9 @@ initisect1(ISect *is)
v = is->part->size & ~(u64int)(is->blocksize - 1);
if(is->blockbase + (u64int)is->blocks * is->blocksize != v){
seterr(ECorrupt, "invalid blocks in index section %s", is->name);
//ZZZZZZZZZ
// freeisect(is);
// return nil;
/*ZZZZZZZZZ */
/* freeisect(is); */
/* return nil; */
}
if(is->stop - is->start > is->blocks){
@ -483,7 +483,7 @@ wbisect(ISect *is)
b = alloczblock(HeadSize, 1, 0);
if(b == nil)
//ZZZ set error?
/*ZZZ set error? */
return -1;
if(packisect(is, b->data) < 0){