mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 15:12:07 -06:00
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6653 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
0858532ea9
commit
54042bcf24
2 changed files with 4 additions and 4 deletions
|
@ -841,7 +841,7 @@ int acpi_table_add(const char *t)
|
||||||
f = buf;
|
f = buf;
|
||||||
while (buf[0]) {
|
while (buf[0]) {
|
||||||
struct stat s;
|
struct stat s;
|
||||||
char *n = index(f, ':');
|
char *n = strchr(f, ':');
|
||||||
if (n)
|
if (n)
|
||||||
*n = '\0';
|
*n = '\0';
|
||||||
if(stat(f, &s) < 0) {
|
if(stat(f, &s) < 0) {
|
||||||
|
@ -873,7 +873,7 @@ int acpi_table_add(const char *t)
|
||||||
while (buf[0]) {
|
while (buf[0]) {
|
||||||
struct stat s;
|
struct stat s;
|
||||||
int fd;
|
int fd;
|
||||||
char *n = index(f, ':');
|
char *n = strchr(f, ':');
|
||||||
if (n)
|
if (n)
|
||||||
*n = '\0';
|
*n = '\0';
|
||||||
fd = open(f, O_RDONLY);
|
fd = open(f, O_RDONLY);
|
||||||
|
|
4
vl.c
4
vl.c
|
@ -4641,8 +4641,8 @@ int main(int argc, char **argv, char **envp)
|
||||||
const char *pid_file = NULL;
|
const char *pid_file = NULL;
|
||||||
int autostart;
|
int autostart;
|
||||||
const char *incoming = NULL;
|
const char *incoming = NULL;
|
||||||
int fd;
|
int fd = 0;
|
||||||
struct passwd *pwd;
|
struct passwd *pwd = NULL;
|
||||||
const char *chroot_dir = NULL;
|
const char *chroot_dir = NULL;
|
||||||
const char *run_as = NULL;
|
const char *run_as = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue