Commit 69b349765c95b76a446011ee71de57c07c1371e8
1 parent
96b8f136
Fix miscellaneous minor things, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3826 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
6 changed files
with
12 additions
and
8 deletions
aes.c
hw/adlib.c
hw/ide.c
hw/pcnet.c
... | ... | @@ -350,8 +350,8 @@ static inline void pcnet_tmd_load(PCNetState *s, struct pcnet_TMD *tmd, |
350 | 350 | } else { |
351 | 351 | s->phys_mem_read(s->dma_opaque, addr, (void *)tmd, sizeof(*tmd), 0); |
352 | 352 | le32_to_cpus(&tmd->tbadr); |
353 | - le16_to_cpus(&tmd->length); | |
354 | - le16_to_cpus(&tmd->status); | |
353 | + le16_to_cpus((uint16_t *)&tmd->length); | |
354 | + le16_to_cpus((uint16_t *)&tmd->status); | |
355 | 355 | le32_to_cpus(&tmd->misc); |
356 | 356 | le32_to_cpus(&tmd->res); |
357 | 357 | if (BCR_SWSTYLE(s) == 3) { |
... | ... | @@ -416,8 +416,8 @@ static inline void pcnet_rmd_load(PCNetState *s, struct pcnet_RMD *rmd, |
416 | 416 | } else { |
417 | 417 | s->phys_mem_read(s->dma_opaque, addr, (void *)rmd, sizeof(*rmd), 0); |
418 | 418 | le32_to_cpus(&rmd->rbadr); |
419 | - le16_to_cpus(&rmd->buf_length); | |
420 | - le16_to_cpus(&rmd->status); | |
419 | + le16_to_cpus((uint16_t *)&rmd->buf_length); | |
420 | + le16_to_cpus((uint16_t *)&rmd->status); | |
421 | 421 | le32_to_cpus(&rmd->msg_length); |
422 | 422 | le32_to_cpus(&rmd->res); |
423 | 423 | if (BCR_SWSTYLE(s) == 3) { | ... | ... |
monitor.c
vl.c
... | ... | @@ -4423,7 +4423,8 @@ static NetSocketState *net_socket_fd_init(VLANState *vlan, int fd, |
4423 | 4423 | { |
4424 | 4424 | int so_type=-1, optlen=sizeof(so_type); |
4425 | 4425 | |
4426 | - if(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&so_type, &optlen)< 0) { | |
4426 | + if(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&so_type, | |
4427 | + (socklen_t *)&optlen)< 0) { | |
4427 | 4428 | fprintf(stderr, "qemu: error: getsockopt(SO_TYPE) for fd=%d failed\n", fd); |
4428 | 4429 | return NULL; |
4429 | 4430 | } | ... | ... |