From aabc08477cf7b5110bf4594edccfcb8d4611cfde Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 10 Aug 2012 12:34:24 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+), 4 deletions(-) diff --git a/win32/wince/wincecompat.c b/win32/wince/wincecompat.c index 1d8df877..bd49c575 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)