From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J0EO3-0006oi-5g for qemu-devel@nongnu.org; Thu, 06 Dec 2007 05:55:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J0EO2-0006oQ-D3 for qemu-devel@nongnu.org; Thu, 06 Dec 2007 05:55:22 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J0EO2-0006oK-9f for qemu-devel@nongnu.org; Thu, 06 Dec 2007 05:55:22 -0500 Received: from outbound-blu.frontbridge.com ([65.55.251.16] helo=outbound7-blu-R.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J0EO1-0003EC-R8 for qemu-devel@nongnu.org; Thu, 06 Dec 2007 05:55:22 -0500 Received: from outbound7-blu.bigfish.com (localhost.localdomain [127.0.0.1]) by outbound7-blu-R.bigfish.com (Postfix) with ESMTP id 356C816FAC93 for ; Thu, 6 Dec 2007 10:55:20 +0000 (UTC) Received: from mail220-blu-R.bigfish.com (unknown [10.1.252.3]) by outbound7-blu.bigfish.com (Postfix) with ESMTP id BB8B316A0051 for ; Thu, 6 Dec 2007 10:55:19 +0000 (UTC) Received: from mail220-blu (localhost.localdomain [127.0.0.1]) by mail220-blu-R.bigfish.com (Postfix) with ESMTP id A89F413E01E3 for ; Thu, 6 Dec 2007 10:55:19 +0000 (UTC) Received: from ausb3extmailp01.amd.com (unknown [163.181.251.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail220-blu.bigfish.com (Postfix) with ESMTP id 5F73215E807E for ; Thu, 6 Dec 2007 10:55:19 +0000 (UTC) Received: from SAUSGW02.amd.com (sausgw02.amd.com [163.181.250.22]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with ESMTP id lB6AtB8Y013199 for ; Thu, 6 Dec 2007 04:55:14 -0600 Message-ID: <4757D4DF.6030504@amd.com> Date: Thu, 06 Dec 2007 11:54:23 +0100 From: "Andre Przywara" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=------------050600030605070807060906 Subject: [Qemu-devel] [PATCH 5/5] gcc4 warnings: miscellaneous minor things 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 This is a multi-part message in MIME format. --------------050600030605070807060906 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit some things found on the way: - missing include in hw/adlib.c - avoid double definition of NDEBUG in aes.h - fix some strange pointer acrobatics in hw/ide.c#padstr - fix getsockopt socklen_t warning - fix uninitialized variable warning in monitor.c - fix wrong signedness in le16_to_cpus calls in hw/pcnet.c -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 277-84917 ----to satisfy European Law for business letters: AMD Saxony Limited Liability Company & Co. KG, Wilschdorfer Landstr. 101, 01109 Dresden, Germany Register Court Dresden: HRA 4896, General Partner authorized to represent: AMD Saxony LLC (Wilmington, Delaware, US) General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --------------050600030605070807060906 Content-Type: text/plain; name=misc.diff Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename=misc.diff Index: aes.c =================================================================== RCS file: /sources/qemu/qemu/aes.c,v retrieving revision 1.4 diff -p -u -r1.4 aes.c --- aes.c 11 Nov 2007 02:51:15 -0000 1.4 +++ aes.c 5 Dec 2007 23:38:56 -0000 @@ -30,7 +30,10 @@ #include "qemu-common.h" #include "aes.h" +#ifndef NDEBUG #define NDEBUG +#endif + #include typedef uint32_t u32; Index: hw/adlib.c =================================================================== RCS file: /sources/qemu/qemu/hw/adlib.c,v retrieving revision 1.10 diff -p -u -r1.10 adlib.c --- hw/adlib.c 2 Dec 2007 17:47:33 -0000 1.10 +++ hw/adlib.c 5 Dec 2007 23:38:57 -0000 @@ -26,6 +26,7 @@ #include "hw.h" #include "audiodev.h" #include "audio/audio.h" +#include "isa.h" //#define DEBUG Index: hw/ide.c =================================================================== RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.72 diff -p -u -r1.72 ide.c --- hw/ide.c 18 Nov 2007 01:44:37 -0000 1.72 +++ hw/ide.c 5 Dec 2007 23:38:57 -0000 @@ -430,8 +430,7 @@ static void padstr(char *str, const char v = *src++; else v = ' '; - *(char *)((long)str ^ 1) = v; - str++; + str[i^1] = v; } } Index: hw/pcnet.c =================================================================== RCS file: /sources/qemu/qemu/hw/pcnet.c,v retrieving revision 1.20 diff -p -u -r1.20 pcnet.c --- hw/pcnet.c 17 Nov 2007 17:14:45 -0000 1.20 +++ hw/pcnet.c 5 Dec 2007 23:38:58 -0000 @@ -350,8 +350,8 @@ static inline void pcnet_tmd_load(PCNetS } 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(PCNetS } 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) { Index: monitor.c =================================================================== RCS file: /sources/qemu/qemu/monitor.c,v retrieving revision 1.91 diff -p -u -r1.91 monitor.c --- monitor.c 3 Dec 2007 17:05:38 -0000 1.91 +++ monitor.c 5 Dec 2007 23:38:57 -0000 @@ -1824,7 +1824,7 @@ static int64_t expr_unary(void) case '$': { char buf[128], *q; - target_long reg; + target_long reg=0; pch++; q = buf; Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.376 diff -p -u -r1.376 vl.c --- vl.c 4 Dec 2007 00:10:34 -0000 1.376 +++ vl.c 5 Dec 2007 23:38:57 -0000 @@ -4397,7 +4398,8 @@ static NetSocketState *net_socket_fd_ini { int so_type=-1, optlen=sizeof(so_type); - if(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&so_type, &optlen)< 0) { + if(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&so_type, + (socklen_t *)&optlen)< 0) { fprintf(stderr, "qemu: error: getsockopt(SO_TYPE) for fd=%d failed\n", fd); return NULL; } --------------050600030605070807060906--