From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNA9z-0007Ul-VJ for qemu-devel@nongnu.org; Wed, 14 Jan 2009 13:08:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNA9y-0007TY-5K for qemu-devel@nongnu.org; Wed, 14 Jan 2009 13:08:10 -0500 Received: from [199.232.76.173] (port=56390 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNA9x-0007TL-Rf for qemu-devel@nongnu.org; Wed, 14 Jan 2009 13:08:09 -0500 Received: from savannah.gnu.org ([199.232.41.3]:46458 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNA9x-0003GI-FY for qemu-devel@nongnu.org; Wed, 14 Jan 2009 13:08:09 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LNA9w-00036e-Ve for qemu-devel@nongnu.org; Wed, 14 Jan 2009 18:08:09 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LNA9w-00036Y-LM for qemu-devel@nongnu.org; Wed, 14 Jan 2009 18:08:08 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Wed, 14 Jan 2009 18:08:08 +0000 Subject: [Qemu-devel] [6299] Make OpenBSD sparc-softmmu compile warning free Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6299 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6299 Author: blueswir1 Date: 2009-01-14 18:08:08 +0000 (Wed, 14 Jan 2009) Log Message: ----------- Make OpenBSD sparc-softmmu compile warning free Modified Paths: -------------- trunk/hw/scsi-disk.c trunk/qemu-char.c trunk/sparc-dis.c trunk/usb-bsd.c Modified: trunk/hw/scsi-disk.c =================================================================== --- trunk/hw/scsi-disk.c 2009-01-14 18:04:52 UTC (rev 6298) +++ trunk/hw/scsi-disk.c 2009-01-14 18:08:08 UTC (rev 6299) @@ -821,7 +821,7 @@ strncpy(s->drive_serial_str, drive_get_serial(s->bdrv), sizeof(s->drive_serial_str)); if (strlen(s->drive_serial_str) == 0) - strcpy(s->drive_serial_str, "0"); + pstrcpy(s->drive_serial_str, sizeof(s->drive_serial_str), "0"); d = (SCSIDevice *)qemu_mallocz(sizeof(SCSIDevice)); d->state = s; d->destroy = scsi_destroy; Modified: trunk/qemu-char.c =================================================================== --- trunk/qemu-char.c 2009-01-14 18:04:52 UTC (rev 6298) +++ trunk/qemu-char.c 2009-01-14 18:08:08 UTC (rev 6299) @@ -2053,11 +2053,11 @@ if (is_listen) { chr->filename = qemu_malloc(256); if (is_unix) { - strcpy(chr->filename, "unix:"); + pstrcpy(chr->filename, 256, "unix:"); } else if (is_telnet) { - strcpy(chr->filename, "telnet:"); + pstrcpy(chr->filename, 256, "telnet:"); } else { - strcpy(chr->filename, "tcp:"); + pstrcpy(chr->filename, 256, "tcp:"); } offset = strlen(chr->filename); } Modified: trunk/sparc-dis.c =================================================================== --- trunk/sparc-dis.c 2009-01-14 18:04:52 UTC (rev 6298) +++ trunk/sparc-dis.c 2009-01-14 18:08:08 UTC (rev 6299) @@ -224,7 +224,6 @@ #define RS2_G0 RS2 (~0) static const struct sparc_opcode sparc_opcodes[]; -static const int sparc_num_opcodes; static const char *sparc_decode_asi_v8 (int); static const char *sparc_decode_asi_v9 (int); Modified: trunk/usb-bsd.c =================================================================== --- trunk/usb-bsd.c 2009-01-14 18:04:52 UTC (rev 6298) +++ trunk/usb-bsd.c 2009-01-14 18:08:08 UTC (rev 6299) @@ -178,7 +178,7 @@ 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 @@ "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 @@ 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;