qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6653] Remove some warnings and fix windows build.
@ 2009-02-27 22:16 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-02-27 22:16 UTC (permalink / raw)
  To: qemu-devel

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 <aliguori@us.ibm.com>

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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-27 22:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 22:16 [Qemu-devel] [6653] Remove some warnings and fix windows build Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).