aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/db
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2010-03-10 14:50:33 -0800
committerRuss Cox <rsc@swtch.com>2010-03-10 14:50:33 -0800
commit0c9c620f39e56c42802504003fd05664aba670a4 (patch)
treead14a1a51f3b6193d0603725d62a34fbc4647c49 /src/cmd/db
parent2fe14f1315eb8d3235ea8f978e5bd9444f467c2b (diff)
downloadplan9port-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.c5
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*)&dot;
+ u16int sp[2];
+ memmove(&sp, &dot, 4);
dprint("%C%C", sp[0], sp[1]);
endline();
dotinc = 4;