fossil: fix remaining warnings
R=rsc https://codereview.appspot.com/15100044
This commit is contained in:
parent
5a69e405fc
commit
b29ebaab99
5 changed files with 13 additions and 13 deletions
|
|
@ -1900,11 +1900,11 @@ unlinkThread(void *a)
|
|||
}
|
||||
|
||||
static int
|
||||
baddrCmp(void *a0, void *a1)
|
||||
baddrCmp(const void *a0, const void *a1)
|
||||
{
|
||||
BAddr *b0, *b1;
|
||||
b0 = a0;
|
||||
b1 = a1;
|
||||
b0 = (BAddr*)a0;
|
||||
b1 = (BAddr*)a1;
|
||||
|
||||
if(b0->part < b1->part)
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -446,12 +446,12 @@ struct MetaChunk {
|
|||
};
|
||||
|
||||
static int
|
||||
offsetCmp(void *s0, void *s1)
|
||||
offsetCmp(const void *s0, const void *s1)
|
||||
{
|
||||
MetaChunk *mc0, *mc1;
|
||||
|
||||
mc0 = s0;
|
||||
mc1 = s1;
|
||||
mc0 = (MetaChunk*)s0;
|
||||
mc1 = (MetaChunk*)s1;
|
||||
if(mc0->offset < mc1->offset)
|
||||
return -1;
|
||||
if(mc0->offset > mc1->offset)
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ iso9660init(int xfd, Header *xh, char *xfile9660, int xoff9660)
|
|||
ascii();
|
||||
|
||||
v = (Voldesc*)root;
|
||||
if(memcmp(v->magic, "\x01CD001\x01\x00", 8) != 0)
|
||||
if(memcmp(v->magic, "\001CD001\001\000", 8) != 0)
|
||||
sysfatal("%s not a cd image", file9660);
|
||||
|
||||
startoff = iso9660start((Cdir*)v->rootdir)*Blocksize;
|
||||
|
|
@ -256,7 +256,7 @@ fprint(2, "look for %lud at %lud\n", startoff, startoff-off9660);
|
|||
if(readn(fd, sect2, Blocksize) != Blocksize)
|
||||
sysfatal("cannot read first data sector on cd via fossil");
|
||||
if(memcmp(sect, sect2, Blocksize) != 0)
|
||||
sysfatal("iso9660 offset is a lie %08lux %08lux", *(long*)sect, *(long*)sect2);
|
||||
sysfatal("iso9660 offset is a lie");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#define U8PUT(p,v) (p)[0]=(v)
|
||||
#define U16PUT(p,v) (p)[0]=(v)>>8;(p)[1]=(v)
|
||||
#define U32PUT(p,v) (p)[0]=(v)>>24;(p)[1]=(v)>>16;(p)[2]=(v)>>8;(p)[3]=(v)
|
||||
#define U32PUT(p,v) (p)[0]=((v)>>24)&0xFF;(p)[1]=((v)>>16)&0xFF;(p)[2]=((v)>>8)&0xFF;(p)[3]=(v)&0xFF
|
||||
#define U48PUT(p,v,t32) t32=(v)>>32;U16PUT(p,t32);t32=(v);U32PUT((p)+2,t32)
|
||||
#define U64PUT(p,v,t32) t32=(v)>>32;U32PUT(p,t32);t32=(v);U32PUT((p)+4,t32)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ static char ENoFile[] = "file does not exist";
|
|||
|
||||
#define U8PUT(p,v) (p)[0]=(v)
|
||||
#define U16PUT(p,v) (p)[0]=(v)>>8;(p)[1]=(v)
|
||||
#define U32PUT(p,v) (p)[0]=(v)>>24;(p)[1]=(v)>>16;(p)[2]=(v)>>8;(p)[3]=(v)
|
||||
#define U32PUT(p,v) (p)[0]=((v)>>24)&0xFF;(p)[1]=((v)>>16)&0xFF;(p)[2]=((v)>>8)&0xFF;(p)[3]=(v)&0xFF
|
||||
#define U48PUT(p,v,t32) t32=(v)>>32;U16PUT(p,t32);t32=(v);U32PUT((p)+2,t32)
|
||||
#define U64PUT(p,v,t32) t32=(v)>>32;U32PUT(p,t32);t32=(v);U32PUT((p)+4,t32)
|
||||
|
||||
|
|
@ -355,12 +355,12 @@ meCmpOld(MetaEntry *me, char *s)
|
|||
}
|
||||
|
||||
static int
|
||||
offsetCmp(void *s0, void *s1)
|
||||
offsetCmp(const void *s0, const void *s1)
|
||||
{
|
||||
MetaChunk *mc0, *mc1;
|
||||
|
||||
mc0 = s0;
|
||||
mc1 = s1;
|
||||
mc0 = (MetaChunk*)s0;
|
||||
mc1 = (MetaChunk*)s1;
|
||||
if(mc0->offset < mc1->offset)
|
||||
return -1;
|
||||
if(mc0->offset > mc1->offset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue