Commit 69b349765c95b76a446011ee71de57c07c1371e8

Authored by ths
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
... ... @@ -30,7 +30,10 @@
30 30 #include "qemu-common.h"
31 31 #include "aes.h"
32 32  
  33 +#ifndef NDEBUG
33 34 #define NDEBUG
  35 +#endif
  36 +
34 37 #include <assert.h>
35 38  
36 39 typedef uint32_t u32;
... ...
hw/adlib.c
... ... @@ -26,6 +26,7 @@
26 26 #include "hw.h"
27 27 #include "audiodev.h"
28 28 #include "audio/audio.h"
  29 +#include "isa.h"
29 30  
30 31 //#define DEBUG
31 32  
... ...
hw/ide.c
... ... @@ -430,8 +430,7 @@ static void padstr(char *str, const char *src, int len)
430 430 v = *src++;
431 431 else
432 432 v = ' ';
433   - *(char *)((long)str ^ 1) = v;
434   - str++;
  433 + str[i^1] = v;
435 434 }
436 435 }
437 436  
... ...
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
... ... @@ -1824,7 +1824,7 @@ static int64_t expr_unary(void)
1824 1824 case '$':
1825 1825 {
1826 1826 char buf[128], *q;
1827   - target_long reg;
  1827 + target_long reg=0;
1828 1828  
1829 1829 pch++;
1830 1830 q = buf;
... ...
... ... @@ -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 }
... ...