1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-19 00:10:56 +01:00

Paul 28538 / me 28540 / couple of unposted casts:

use char * for pointer arithmetic rather than void *
This commit is contained in:
Peter Stephenson 2010-12-20 10:28:43 +00:00
parent c8d07027c8
commit a7bc22ca00
7 changed files with 17 additions and 17 deletions

View file

@ -2765,7 +2765,7 @@ write_dump(int dfd, LinkList progs, int map, int hlen, int tlen)
fdsetflags(pre, ((map ? FDF_MAP : 0) | other));
fdsetother(pre, tlen);
strcpy(fdversion(pre), ZSH_VERSION);
write_loop(dfd, pre, FD_PRELEN * sizeof(wordcode));
write_loop(dfd, (char *)pre, FD_PRELEN * sizeof(wordcode));
for (node = firstnode(progs); node; incnode(node)) {
wcf = (WCFunc) getdata(node);
@ -2786,11 +2786,11 @@ write_dump(int dfd, LinkList progs, int map, int hlen, int tlen)
head.flags = fdhbldflags(wcf->flags, (tail - n));
if (other)
fdswap((Wordcode) &head, sizeof(head) / sizeof(wordcode));
write_loop(dfd, &head, sizeof(head));
write_loop(dfd, (char *)&head, sizeof(head));
tmp = strlen(n) + 1;
write_loop(dfd, n, tmp);
if ((tmp &= (sizeof(wordcode) - 1)))
write_loop(dfd, &head, sizeof(wordcode) - tmp);
write_loop(dfd, (char *)&head, sizeof(wordcode) - tmp);
}
for (node = firstnode(progs); node; incnode(node)) {
prog = ((WCFunc) getdata(node))->prog;
@ -2798,7 +2798,7 @@ write_dump(int dfd, LinkList progs, int map, int hlen, int tlen)
sizeof(wordcode) - 1) / sizeof(wordcode);
if (other)
fdswap(prog->prog, (((Wordcode) prog->strs) - prog->prog));
write_loop(dfd, prog->prog, tmp * sizeof(wordcode));
write_loop(dfd, (char *)prog->prog, tmp * sizeof(wordcode));
}
if (other)
break;