aboutsummaryrefslogtreecommitdiffstats
path: root/android/utils
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-09-22 14:19:28 +0200
committerDavid 'Digit' Turner <digit@android.com>2010-09-22 14:19:28 +0200
commit4e024bb4f5c8aa8b07459f7fbd65c35122127fd1 (patch)
treeccd5835eef17757d3e1c069e391c415c0135023d /android/utils
parent1d9873b37d2478554d9d678cd410bd3638c8dab3 (diff)
downloadexternal_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.zip
external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.gz
external_qemu-4e024bb4f5c8aa8b07459f7fbd65c35122127fd1.tar.bz2
Remove compiler warnings when building the emulator.
This forces -Wall during the build. Note that this patch doesn't remove all warnings, but most of the remaining ones are from upstream anyway. Change-Id: I8808d8495e99866e156ce5780d2e3c305eab491f
Diffstat (limited to 'android/utils')
-rw-r--r--android/utils/ini.c9
-rw-r--r--android/utils/mapfile.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/android/utils/ini.c b/android/utils/ini.c
index 95bb4e3..317d233 100644
--- a/android/utils/ini.c
+++ b/android/utils/ini.c
@@ -109,8 +109,8 @@ iniFile_getPairCount( IniFile* i )
}
void
-iniFile_getPair( IniFile* i,
- int index,
+iniFile_getPair( IniFile* i,
+ int index,
const char* *pKey,
const char* *pValue )
{
@@ -251,6 +251,7 @@ iniFile_newFromFile( const char* filepath )
char* text;
long size;
IniFile* ini = NULL;
+ size_t len;
if (fp == NULL) {
D("could not open .ini file: %s: %s",
@@ -275,8 +276,8 @@ iniFile_newFromFile( const char* filepath )
/* read the file, add a sentinel at the end of it */
AARRAY_NEW(text, size+1);
- fread(text, 1, size, fp);
- text[size] = 0;
+ len = fread(text, 1, size, fp);
+ text[len] = 0;
ini = iniFile_newFromMemory(text, filepath);
AFREE(text);
diff --git a/android/utils/mapfile.c b/android/utils/mapfile.c
index c8ba8e5..102dfd8 100644
--- a/android/utils/mapfile.c
+++ b/android/utils/mapfile.c
@@ -34,8 +34,8 @@ mapfile_open(const char* path, int oflag, int share_mode)
{
#ifdef WIN32
DWORD win32_share;
- DWORD win32_desired_access;
- DWORD win32_disposition;
+ DWORD win32_desired_access = GENERIC_READ;
+ DWORD win32_disposition = OPEN_EXISTING;
DWORD win32_flags;
/* Convert to Win32 desired access. */