aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-06 17:47:39 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-06 17:47:39 +0000
commiteb38c52c2a6df76928c1a4760bc87d21b256e22a (patch)
tree0b391e1d33f6f47a90f7c3fa8e63e863ee9f1b8e /hw
parent5bfd5521ff344eedd862abdfda9a68cefad912ba (diff)
downloadqemu-eb38c52c2a6df76928c1a4760bc87d21b256e22a.zip
qemu-eb38c52c2a6df76928c1a4760bc87d21b256e22a.tar.gz
qemu-eb38c52c2a6df76928c1a4760bc87d21b256e22a.tar.bz2
Fix most warnings that would be caused by gcc flag -Wundef
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5173 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/omap1.c34
-rw-r--r--hw/pc.c2
-rw-r--r--hw/rtl8139.c4
-rw-r--r--hw/usb-net.c10
-rw-r--r--hw/usb-ohci.c2
5 files changed, 26 insertions, 26 deletions
diff --git a/hw/omap1.c b/hw/omap1.c
index 5854500..101d36b 100644
--- a/hw/omap1.c
+++ b/hw/omap1.c
@@ -3478,7 +3478,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
switch (offset) {
case 0x00: /* SECONDS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC SEC_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_sec;
@@ -3486,7 +3486,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x04: /* MINUTES_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC MIN_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_min * 60;
@@ -3494,7 +3494,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x08: /* HOURS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC HRS_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_hour * 3600;
@@ -3506,7 +3506,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x0c: /* DAYS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC DAY_REG <-- %02x\n", value);
#endif
s->ti -= s->current_tm.tm_mday * 86400;
@@ -3514,7 +3514,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x10: /* MONTHS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC MTH_REG <-- %02x\n", value);
#endif
memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
@@ -3533,7 +3533,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x14: /* YEARS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC YRS_REG <-- %02x\n", value);
#endif
memcpy(&new_tm, &s->current_tm, sizeof(new_tm));
@@ -3555,7 +3555,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return; /* Ignored */
case 0x20: /* ALARM_SECONDS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM SEC_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_sec = omap_rtc_bin(value);
@@ -3563,7 +3563,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x24: /* ALARM_MINUTES_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM MIN_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_min = omap_rtc_bin(value);
@@ -3571,7 +3571,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x28: /* ALARM_HOURS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM HRS_REG <-- %02x\n", value);
#endif
if (s->pm_am)
@@ -3584,7 +3584,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x2c: /* ALARM_DAYS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM DAY_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_mday = omap_rtc_bin(value);
@@ -3592,7 +3592,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x30: /* ALARM_MONTHS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM MON_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_mon = omap_rtc_bin(value);
@@ -3600,7 +3600,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x34: /* ALARM_YEARS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("ALM YRS_REG <-- %02x\n", value);
#endif
s->alarm_tm.tm_year = omap_rtc_bin(value);
@@ -3608,7 +3608,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x40: /* RTC_CTRL_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC CONTROL <-- %02x\n", value);
#endif
s->pm_am = (value >> 3) & 1;
@@ -3620,7 +3620,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x44: /* RTC_STATUS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC STATUSL <-- %02x\n", value);
#endif
s->status &= ~((value & 0xc0) ^ 0x80);
@@ -3628,14 +3628,14 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x48: /* RTC_INTERRUPTS_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC INTRS <-- %02x\n", value);
#endif
s->interrupts = value;
return;
case 0x4c: /* RTC_COMP_LSB_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC COMPLSB <-- %02x\n", value);
#endif
s->comp_reg &= 0xff00;
@@ -3643,7 +3643,7 @@ static void omap_rtc_write(void *opaque, target_phys_addr_t addr,
return;
case 0x50: /* RTC_COMP_MSB_REG */
-#if ALMDEBUG
+#ifdef ALMDEBUG
printf("RTC COMPMSB <-- %02x\n", value);
#endif
s->comp_reg &= 0x00ff;
diff --git a/hw/pc.c b/hw/pc.c
index 213ead8..435c7d4 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -76,7 +76,7 @@ uint64_t cpu_get_tsc(CPUX86State *env)
/* Note: when using kqemu, it is more logical to return the host TSC
because kqemu does not trap the RDTSC instruction for
performance reasons */
-#if USE_KQEMU
+#ifdef USE_KQEMU
if (env->kqemu_enabled) {
return cpu_get_real_ticks();
} else
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 6aec2ff..cae8788 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3356,7 +3356,7 @@ static inline int64_t rtl8139_get_next_tctr_time(RTL8139State *s, int64_t curren
return next_time;
}
-#if RTL8139_ONBOARD_TIMER
+#ifdef RTL8139_ONBOARD_TIMER
static void rtl8139_timer(void *opaque)
{
RTL8139State *s = opaque;
@@ -3456,7 +3456,7 @@ void pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn)
register_savevm("rtl8139", -1, 3, rtl8139_save, rtl8139_load, s);
-#if RTL8139_ONBOARD_TIMER
+#ifdef RTL8139_ONBOARD_TIMER
s->timer = qemu_new_timer(vm_clock, rtl8139_timer, s);
qemu_mod_timer(s->timer,
diff --git a/hw/usb-net.c b/hw/usb-net.c
index 27dea10..63edfd5 100644
--- a/hw/usb-net.c
+++ b/hw/usb-net.c
@@ -1069,7 +1069,7 @@ static int usb_net_handle_control(USBDevice *dev, int request, int value,
case ClassInterfaceOutRequest | USB_CDC_SEND_ENCAPSULATED_COMMAND:
if (!s->rndis || value || index != 0)
goto fail;
-#if TRAFFIC_DEBUG
+#ifdef TRAFFIC_DEBUG
{
unsigned int i;
fprintf(stderr, "SEND_ENCAPSULATED_COMMAND:");
@@ -1092,7 +1092,7 @@ static int usb_net_handle_control(USBDevice *dev, int request, int value,
data[0] = 0;
ret = 1;
}
-#if TRAFFIC_DEBUG
+#ifdef TRAFFIC_DEBUG
{
unsigned int i;
fprintf(stderr, "GET_ENCAPSULATED_RESPONSE:");
@@ -1219,7 +1219,7 @@ static int usb_net_handle_statusin(USBNetState *s, USBPacket *p)
if (!s->rndis_resp.tqh_first)
ret = USB_RET_NAK;
-#if DEBUG
+#ifdef TRAFFIC_DEBUG
fprintf(stderr, "usbnet: interrupt poll len %u return %d", p->len, ret);
{
int i;
@@ -1260,7 +1260,7 @@ static int usb_net_handle_datain(USBNetState *s, USBPacket *p)
s->in_ptr = s->in_len = 0;
}
-#if TRAFFIC_DEBUG
+#ifdef TRAFFIC_DEBUG
fprintf(stderr, "usbnet: data in len %u return %d", p->len, ret);
{
int i;
@@ -1285,7 +1285,7 @@ static int usb_net_handle_dataout(USBNetState *s, USBPacket *p)
(struct rndis_packet_msg_type *) s->out_buf;
uint32_t len;
-#if TRAFFIC_DEBUG
+#ifdef TRAFFIC_DEBUG
fprintf(stderr, "usbnet: data out len %u\n", p->len);
{
int i;
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 68995b0..afd5506 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1598,7 +1598,7 @@ static void usb_ohci_init(OHCIState *ohci, int num_ports, int devfn,
int i;
if (usb_frame_time == 0) {
-#if OHCI_TIME_WARP
+#ifdef OHCI_TIME_WARP
usb_frame_time = ticks_per_sec;
usb_bit_time = muldiv64(1, ticks_per_sec, USB_HZ/1000);
#else