From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LdB0m-0001OG-AD for qemu-devel@nongnu.org; Fri, 27 Feb 2009 17:16:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LdB0l-0001MO-5D for qemu-devel@nongnu.org; Fri, 27 Feb 2009 17:16:51 -0500 Received: from [199.232.76.173] (port=53266 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LdB0k-0001M1-UP for qemu-devel@nongnu.org; Fri, 27 Feb 2009 17:16:50 -0500 Received: from savannah.gnu.org ([199.232.41.3]:54128 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 1LdB0k-0006nI-Lh for qemu-devel@nongnu.org; Fri, 27 Feb 2009 17:16:50 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LdB0j-0001yB-Ge for qemu-devel@nongnu.org; Fri, 27 Feb 2009 22:16:49 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LdB0i-0001y7-SH for qemu-devel@nongnu.org; Fri, 27 Feb 2009 22:16:49 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 27 Feb 2009 22:16:48 +0000 Subject: [Qemu-devel] [6653] Remove some warnings and fix windows build. 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: 6653 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6653 Author: aliguori Date: 2009-02-27 22:16:47 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Remove some warnings and fix windows build. Initialize some variables to make GCC happy and switch from using index to strchr. index is not available on Windows. Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/acpi.c trunk/vl.c Modified: trunk/hw/acpi.c =================================================================== --- trunk/hw/acpi.c 2009-02-27 22:09:45 UTC (rev 6652) +++ trunk/hw/acpi.c 2009-02-27 22:16:47 UTC (rev 6653) @@ -841,7 +841,7 @@ f = buf; while (buf[0]) { struct stat s; - char *n = index(f, ':'); + char *n = strchr(f, ':'); if (n) *n = '\0'; if(stat(f, &s) < 0) { @@ -873,7 +873,7 @@ while (buf[0]) { struct stat s; int fd; - char *n = index(f, ':'); + char *n = strchr(f, ':'); if (n) *n = '\0'; fd = open(f, O_RDONLY); Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2009-02-27 22:09:45 UTC (rev 6652) +++ trunk/vl.c 2009-02-27 22:16:47 UTC (rev 6653) @@ -4641,8 +4641,8 @@ const char *pid_file = NULL; int autostart; const char *incoming = NULL; - int fd; - struct passwd *pwd; + int fd = 0; + struct passwd *pwd = NULL; const char *chroot_dir = NULL; const char *run_as = NULL;