[libxml2] Fix compiler warnings of wincecompat.c
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix compiler warnings of wincecompat.c
- Date: Mon, 13 Aug 2012 10:04:15 +0000 (UTC)
commit aabc08477cf7b5110bf4594edccfcb8d4611cfde
Author: Patrick Gansterer <paroga paroga com>
Date: Fri Aug 10 12:34:24 2012 +0200
Fix compiler warnings of wincecompat.c
For https://bugzilla.gnome.org/show_bug.cgi?id=681592
*) Add and explicit cast when converting FILE* to int
*) Don't assign a c-string to the element of an char-array
win32/wince/wincecompat.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/win32/wince/wincecompat.c b/win32/wince/wincecompat.c
index 1d8df87..bd49c57 100644
--- a/win32/wince/wincecompat.c
+++ b/win32/wince/wincecompat.c
@@ -34,11 +34,10 @@ int open(const char *filename,int oflag, ...)
char mode[3]; /* mode[0] ="w/r/a" mode[1]="+" */
mode[2]=0;
if ( oflag==(O_WRONLY|O_CREAT) )
- mode[0]="w";
+ mode[0]='w';
else if (oflag==O_RDONLY)
- mode[0]="r";
- return fopen(filename, mode);
-
+ mode[0]='r';
+ return (int) fopen(filename, mode);
}
int close(int handle)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]