summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-17 03:15:52 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-17 03:15:52 +0000
commit69b349765c95b76a446011ee71de57c07c1371e8 (patch)
tree179c9d104178f1e15f61bcbc2bfc2a2849a17bf8 /hw
parent96b8f136f52ea2dc5948fe24f0bf4483251ac280 (diff)
Fix miscellaneous minor things, by Andre Przywara.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3826 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/adlib.c1
-rw-r--r--hw/ide.c3
-rw-r--r--hw/pcnet.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/adlib.c b/hw/adlib.c
index 1376db919..7a9c2e7f5 100644
--- a/hw/adlib.c
+++ b/hw/adlib.c
@@ -26,6 +26,7 @@
#include "hw.h"
#include "audiodev.h"
#include "audio/audio.h"
+#include "isa.h"
//#define DEBUG
diff --git a/hw/ide.c b/hw/ide.c
index bc82bb21d..3715b9c96 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -430,8 +430,7 @@ static void padstr(char *str, const char *src, int len)
v = *src++;
else
v = ' ';
- *(char *)((long)str ^ 1) = v;
- str++;
+ str[i^1] = v;
}
}
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 3466082dc..40070ee60 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -350,8 +350,8 @@ static inline void pcnet_tmd_load(PCNetState *s, struct pcnet_TMD *tmd,
} else {
s->phys_mem_read(s->dma_opaque, addr, (void *)tmd, sizeof(*tmd), 0);
le32_to_cpus(&tmd->tbadr);
- le16_to_cpus(&tmd->length);
- le16_to_cpus(&tmd->status);
+ le16_to_cpus((uint16_t *)&tmd->length);
+ le16_to_cpus((uint16_t *)&tmd->status);
le32_to_cpus(&tmd->misc);
le32_to_cpus(&tmd->res);
if (BCR_SWSTYLE(s) == 3) {
@@ -416,8 +416,8 @@ static inline void pcnet_rmd_load(PCNetState *s, struct pcnet_RMD *rmd,
} else {
s->phys_mem_read(s->dma_opaque, addr, (void *)rmd, sizeof(*rmd), 0);
le32_to_cpus(&rmd->rbadr);
- le16_to_cpus(&rmd->buf_length);
- le16_to_cpus(&rmd->status);
+ le16_to_cpus((uint16_t *)&rmd->buf_length);
+ le16_to_cpus((uint16_t *)&rmd->status);
le32_to_cpus(&rmd->msg_length);
le32_to_cpus(&rmd->res);
if (BCR_SWSTYLE(s) == 3) {