From 54042bcf24b6c7c1c99f7a022f3cd00ba338f708 Mon Sep 17 00:00:00 2001 From: aliguori Date: Fri, 27 Feb 2009 22:16:47 +0000 Subject: 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 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6653 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/acpi.c | 4 ++-- vl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index 52bc43ad58..52f50a0814 100644 --- a/hw/acpi.c +++ b/hw/acpi.c @@ -841,7 +841,7 @@ int acpi_table_add(const char *t) 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 @@ int acpi_table_add(const char *t) 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); diff --git a/vl.c b/vl.c index 8e59cd8d74..1d96a313db 100644 --- a/vl.c +++ b/vl.c @@ -4641,8 +4641,8 @@ int main(int argc, char **argv, char **envp) 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; -- cgit v1.2.3