fix type-punned pointer warnings from gcc

R=rsc
http://codereview.appspot.com/396042
This commit is contained in:
Russ Cox 2010-03-10 14:50:33 -08:00
parent 2fe14f1315
commit 0c9c620f39
11 changed files with 57 additions and 29 deletions

View file

@ -60,7 +60,7 @@ exform(int fcount, int prt, char *ifp, Map *map, int literal, int firstpass)
char *fp;
char c, modifier;
int i;
ushort sh, *sp;
ushort sh;
uchar ch, *cp;
Symbol s;
char buf[512];
@ -205,7 +205,8 @@ exform(int fcount, int prt, char *ifp, Map *map, int literal, int firstpass)
case 'R':
if (literal) {
sp = (u16int*)(void*)˙
u16int sp[2];
memmove(&sp, &dot, 4);
dprint("%C%C", sp[0], sp[1]);
endline();
dotinc = 4;