Skip to content

Commit

Permalink
fix gcc 4.8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
0intro committed Mar 3, 2014
1 parent 24b8994 commit 63002b3
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/cmd/devdraw/x11-draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ xdraw(Memdrawparam *par)
{
u32int sdval;
uint m, state;
Memimage *src, *dst, *mask;
Memimage *dst, *mask;
Point dp, mp;
Rectangle r;
Xmem *xdst, *xmask;
Expand All @@ -56,7 +56,6 @@ xdraw(Memdrawparam *par)
dst = par->dst;
mask = par->mask;
r = par->r;
src = par->src;
state = par->state;

/*
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/fontsrv/x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ mksubfont(char *name, int lo, int hi, int size, int antialias)
int i;
Fontchar *fc, *fc0;
Memsubfont *sf;
Point rect_points[4];
//Point rect_points[4];

xf = nil;
for(xfp=xfont, xfe=xfont+nxfont; xfp != xfe; xfp++) {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/join.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define comp() runecmp(ppi[F1][j1],ppi[F2][j2])
FILE *f[2];
Rune buf[2][BUFSIZ]; /*input lines */
Rune *ppi[2][NFLD+1]; /* pointers to fields in lines */
Rune *ppi[4][NFLD+1]; /* pointers to fields in lines */
Rune *s1,*s2;
#define j1 joinj1
#define j2 joinj2
Expand Down
3 changes: 1 addition & 2 deletions src/cmd/postscript/tr2post/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,8 @@ runeout(Rune rune) {
void
specialout(char *stoken) {
Rune rune;
int i;

i = chartorune(&rune, stoken);
chartorune(&rune, stoken);
glyphout(rune, stoken, TRUE);
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/rio/showevent/ShowEvent.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ void ShowEvent(XEvent *eev)
printf("type=%s%s", GetType((XEvent*)ev), sep);
printf("serial=%ld%s", ev->serial, sep);
printf("send_event=%s%s", TorF(ev->send_event), sep);
printf("display=0x%x%s", (unsigned)ev->display, sep);
printf("display=0x%p%s", ev->display, sep);

switch (ev->type) {
case MotionNotify:
Expand Down
8 changes: 0 additions & 8 deletions src/libventi/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ blockwalk(VtFile *r, VtBlock *p, int index, VtCache *c, int mode, VtEntry *e)
VtBlock *b;
int type, size;
uchar *score;
VtEntry oe;

switch(p->type){
case VtDataType:
Expand Down Expand Up @@ -531,8 +530,6 @@ blockwalk(VtFile *r, VtBlock *p, int index, VtCache *c, int mode, VtEntry *e)
if(vtglobaltolocal(b->score) != NilBlock)
return b;

oe = *e;

/*
* Copy on write.
*/
Expand Down Expand Up @@ -560,7 +557,6 @@ static int
growdepth(VtFile *r, VtBlock *p, VtEntry *e, int depth)
{
VtBlock *b, *bb;
VtEntry oe;

assert(ISLOCKED(r));
assert(depth <= VtPointerDepth);
Expand All @@ -569,8 +565,6 @@ growdepth(VtFile *r, VtBlock *p, VtEntry *e, int depth)
if(b == nil)
return -1;

oe = *e;

/*
* Keep adding layers until we get to the right depth
* or an error occurs.
Expand Down Expand Up @@ -599,7 +593,6 @@ static int
shrinkdepth(VtFile *r, VtBlock *p, VtEntry *e, int depth)
{
VtBlock *b, *nb, *ob, *rb;
VtEntry oe;

assert(ISLOCKED(r));
assert(depth <= VtPointerDepth);
Expand All @@ -612,7 +605,6 @@ shrinkdepth(VtFile *r, VtBlock *p, VtEntry *e, int depth)
* Walk down to the new root block.
* We may stop early, but something is better than nothing.
*/
oe = *e;

ob = nil;
b = rb;
Expand Down

0 comments on commit 63002b3

Please sign in to comment.