Avoid casts as lvalues.
This commit is contained in:
parent
3bdee39ecb
commit
eec256de79
@ -170,9 +170,11 @@ db_init(void)
|
||||
|
||||
if (ksym_end > ksym_start && ksym_start != 0) {
|
||||
symtab = ksym_start;
|
||||
tabsz = *((Elf_Size*)symtab)++;
|
||||
tabsz = *((Elf_Size*)symtab);
|
||||
tabsz += sizeof(Elf_Size);
|
||||
strtab = symtab + tabsz;
|
||||
strsz = *((Elf_Size*)strtab)++;
|
||||
strsz = *((Elf_Size*)strtab);
|
||||
strsz += sizeof(Elf_Size);
|
||||
if (strtab + strsz <= ksym_end) {
|
||||
db_add_symbol_table((char *)symtab,
|
||||
(char *)(symtab + tabsz), "elf", (char *)strtab);
|
||||
|
@ -955,7 +955,7 @@ aac_bio_command(struct aac_softc *sc, struct aac_command **cmp)
|
||||
br->Flags = 0;
|
||||
fib->Header.Size += sizeof(struct aac_blockread64);
|
||||
cm->cm_flags |= AAC_CMD_DATAOUT;
|
||||
(struct aac_sg_table64 *)cm->cm_sgtable = &br->SgMap64;
|
||||
cm->cm_sgtable = (struct aac_sg_table *)&br->SgMap64;
|
||||
} else {
|
||||
struct aac_blockwrite64 *bw;
|
||||
bw = (struct aac_blockwrite64 *)&fib->data[0];
|
||||
@ -967,7 +967,7 @@ aac_bio_command(struct aac_softc *sc, struct aac_command **cmp)
|
||||
bw->Flags = 0;
|
||||
fib->Header.Size += sizeof(struct aac_blockwrite64);
|
||||
cm->cm_flags |= AAC_CMD_DATAIN;
|
||||
(struct aac_sg_table64 *)cm->cm_sgtable = &bw->SgMap64;
|
||||
cm->cm_sgtable = (struct aac_sg_table *)&bw->SgMap64;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1503,7 +1503,8 @@ aac_init(struct aac_softc *sc)
|
||||
aac_common_map, sc, 0);
|
||||
|
||||
if (sc->aac_common_busaddr < 8192) {
|
||||
(uint8_t *)sc->aac_common += 8192;
|
||||
sc->aac_common = (struct aac_common *)
|
||||
((uint8_t *)sc->aac_common + 8192);
|
||||
sc->aac_common_busaddr += 8192;
|
||||
}
|
||||
bzero(sc->aac_common, sizeof(*sc->aac_common));
|
||||
|
@ -282,7 +282,7 @@ aac_disk_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size
|
||||
|
||||
length -= len;
|
||||
offset += len;
|
||||
(vm_offset_t)virtual += len;
|
||||
virtual = (uint8_t *)virtual + len;
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
@ -1760,7 +1760,7 @@ fw_rcv_copy(struct fw_rcv_buf *rb)
|
||||
/* Copy header */
|
||||
p = (u_char *)&rb->xfer->recv.hdr;
|
||||
bcopy(rb->vec->iov_base, p, tinfo->hdr_len);
|
||||
(u_char *)rb->vec->iov_base += tinfo->hdr_len;
|
||||
rb->vec->iov_base = (u_char *)rb->vec->iov_base + tinfo->hdr_len;
|
||||
rb->vec->iov_len -= tinfo->hdr_len;
|
||||
|
||||
/* Copy payload */
|
||||
|
@ -1058,22 +1058,21 @@ get_tl(struct sony_toc *toc, int size)
|
||||
|
||||
if (tl->track != 0xb0)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
if (tl->track != 0xb1)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
tl = (struct sony_tracklist *)((char *)tl + 9);
|
||||
if (tl->track != 0xb2)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
tl = (struct sony_tracklist *)((char *)tl + 9);
|
||||
if (tl->track != 0xb3)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
tl = (struct sony_tracklist *)((char *)tl + 9);
|
||||
if (tl->track != 0xb4)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
tl = (struct sony_tracklist *)((char *)tl + 9);
|
||||
if (tl->track != 0xc0)
|
||||
return (tl);
|
||||
(char *)tl += 9;
|
||||
tl = (struct sony_tracklist *)((char *)tl + 9);
|
||||
return (tl);
|
||||
}
|
||||
|
||||
|
@ -215,22 +215,36 @@ static char *si_type[] = {
|
||||
static void __inline
|
||||
si_bcopy(const void *src, void *dst, size_t len)
|
||||
{
|
||||
u_char *d;
|
||||
const u_char *s;
|
||||
|
||||
d = dst;
|
||||
s = src;
|
||||
while (len--)
|
||||
*(((u_char *)dst)++) = *(((const u_char *)src)++);
|
||||
*d++ = *s++;
|
||||
}
|
||||
static void __inline
|
||||
si_vbcopy(const volatile void *src, void *dst, size_t len)
|
||||
{
|
||||
u_char *d;
|
||||
const volatile u_char *s;
|
||||
|
||||
d = dst;
|
||||
s = src;
|
||||
while (len--)
|
||||
*(((u_char *)dst)++) = *(((const volatile u_char *)src)++);
|
||||
*d++ = *s++;
|
||||
}
|
||||
static void __inline
|
||||
si_bcopyv(const void *src, volatile void *dst, size_t len)
|
||||
{
|
||||
while (len--)
|
||||
*(((volatile u_char *)dst)++) = *(((const u_char *)src)++);
|
||||
}
|
||||
volatile u_char *d;
|
||||
const u_char *s;
|
||||
|
||||
d = dst;
|
||||
s = src;
|
||||
while (len--)
|
||||
*d++ = *s++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach the device. Initialize the card.
|
||||
|
Loading…
Reference in New Issue
Block a user