From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6653] Remove some warnings and fix windows build.
Date: Fri, 27 Feb 2009 22:16:48 +0000 [thread overview]
Message-ID: <E1LdB0i-0001y7-SH@cvs.savannah.gnu.org> (raw)
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;
reply other threads:[~2009-02-27 22:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1LdB0i-0001y7-SH@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).