summaryrefslogtreecommitdiff
path: root/usb-bsd.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-14 18:08:08 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-14 18:08:08 +0000
commit55687cb8704535c27a7f93f4bb482da3d4da043b (patch)
treecccde1d375b501d7ae1c33c6e3e64695f4f0277c /usb-bsd.c
parent5fdff888d8893b4be15a01a0bcac4c0246fd6a09 (diff)
downloadqemu-55687cb8704535c27a7f93f4bb482da3d4da043b.tar.gz
qemu-55687cb8704535c27a7f93f4bb482da3d4da043b.tar.bz2
qemu-55687cb8704535c27a7f93f4bb482da3d4da043b.zip
Make OpenBSD sparc-softmmu compile warning free
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6299 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'usb-bsd.c')
-rw-r--r--usb-bsd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usb-bsd.c b/usb-bsd.c
index 0e4157c58b..a8a805f064 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -178,7 +178,7 @@ static int usb_host_handle_control(USBDevice *dev,
req.ucr_flags = USBD_SHORT_XFER_OK;
ret = ioctl(s->devfd, USB_SET_TIMEOUT, &timeout);
-#if (__NetBSD__ || __OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
if (ret < 0 && errno != EINVAL) {
#else
if (ret < 0) {
@@ -372,7 +372,7 @@ USBDevice *usb_host_device_open(const char *devname)
"host:%s", devname);
pstrcpy(dev->devpath, sizeof(dev->devpath), "/dev/");
- strcat(dev->devpath, dev_info.udi_devnames[0]);
+ pstrcat(dev->devpath, sizeof(dev->devpath), dev_info.udi_devnames[0]);
/* Mark the endpoints as not yet open */
for (i = 0; i < USB_MAX_ENDPOINTS; i++)
@@ -550,10 +550,10 @@ static const char *usb_class_str(uint8_t class)
return p->class_name;
}
-void usb_info_device(int bus_num, int addr, int class_id,
- int vendor_id, int product_id,
- const char *product_name,
- int speed)
+static void usb_info_device(int bus_num, int addr, int class_id,
+ int vendor_id, int product_id,
+ const char *product_name,
+ int speed)
{
const char *class_str, *speed_str;