diff options
author | Russ Cox <rsc@swtch.com> | 2010-03-10 14:50:33 -0800 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2010-03-10 14:50:33 -0800 |
commit | 0c9c620f39e56c42802504003fd05664aba670a4 (patch) | |
tree | ad14a1a51f3b6193d0603725d62a34fbc4647c49 /src/cmd/db | |
parent | 2fe14f1315eb8d3235ea8f978e5bd9444f467c2b (diff) | |
download | plan9port-0c9c620f39e56c42802504003fd05664aba670a4.tar.gz plan9port-0c9c620f39e56c42802504003fd05664aba670a4.tar.bz2 plan9port-0c9c620f39e56c42802504003fd05664aba670a4.zip |
fix type-punned pointer warnings from gcc
R=rsc
http://codereview.appspot.com/396042
Diffstat (limited to 'src/cmd/db')
-rw-r--r-- | src/cmd/db/format.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/db/format.c b/src/cmd/db/format.c index 08068e61..7a93bc5f 100644 --- a/src/cmd/db/format.c +++ b/src/cmd/db/format.c @@ -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; |