Skip to content

Commit

Permalink
fossil: fix remaining warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
0intro committed Oct 23, 2013
1 parent df613e3 commit feba6f0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/cmd/fossil/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/fossil/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/fossil/flfmt9660.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/fossil/pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions src/cmd/fossil/vac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit feba6f0

Please sign in to comment.