emulator: apply strict policies on compilation warnings on Windows 68/24468/4
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 15 Jul 2014 05:55:24 +0000 (14:55 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Tue, 15 Jul 2014 07:07:11 +0000 (16:07 +0900)
enable -Werror except for -Wformat, -Wformat-extra-args, -Wpointer-to-int-cast, -Wint-to-pointor-cast.

Change-Id: I79a7f3a9678d3321c4989333f07f9eec4ba0522e
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
hw/9pfs/virtio-9p-local-maru.c
tizen/emulator_configure.sh
tizen/src/display/maru_sdl.c
tizen/src/display/maru_sdl.h
tizen/src/skin/maruskin_operation.c
tizen/src/util/maru_err_table.c
tizen/src/util/sdb.c

index a2aa07a..5ca2d15 100644 (file)
@@ -334,9 +334,14 @@ update_map_file:
     if (credp->fc_gid != -1) {
         gid = credp->fc_gid;
     }
+// FIXME
+#ifndef CONFIG_WIN32
     if (credp->fc_mode != -1) {
         mode = credp->fc_mode;
     }
+#else
+    mode = credp->fc_mode;
+#endif
     if (credp->fc_rdev != -1) {
         rdev = credp->fc_rdev;
     }
index cebc28e..b942a1a 100755 (executable)
@@ -213,8 +213,11 @@ echo ""
 echo "##### QEMU configuring for emulator"
 echo "##### QEMU configure append:" $CONFIGURE_APPEND
 exec ./configure \
- --extra-cflags=-Werror=implicit-function-declaration \
- --extra-cflags=-Werror=implicit-int \
+ --enable-werror \
+ --extra-cflags=-Wno-error=format \
+ --extra-cflags=-Wno-error=format-extra-args \
+ --extra-cflags=-Wno-error=pointer-to-int-cast \
+ --extra-cflags=-Wno-error=int-to-pointer-cast \
  --extra-ldflags=-Wl,--large-address-aware \
  --cc=gcc \
  --disable-coroutine-pool \
index 426daa9..1c92fe7 100644 (file)
 #include "hw/pci/maru_brightness.h"
 #include "debug_ch.h"
 
+#ifndef CONFIG_WIN32
+#include <SDL_syswm.h>
+#endif
+
 MULTI_DEBUG_CHANNEL(tizen, maru_sdl);
 
 static QEMUBH *sdl_init_bh;
index 342f4d2..7b30156 100644 (file)
@@ -33,7 +33,6 @@
 #define MARU_SDL_H_
 
 #include <SDL.h>
-#include <SDL_syswm.h>
 #include "ui/console.h"
 
 extern DisplayChangeListenerOps maru_dcl_ops;
index 383343a..7be2597 100644 (file)
@@ -653,7 +653,7 @@ static void send_to_emuld(const char* request_type,
     if(send( s, (char*)request_type, request_size, 0 ) < 0) {
         ERR("failed to send to emuld\n");
     }
-    if(send( s, &buf_size, 4, 0 ) < 0) {
+    if(send( s, (char*)&buf_size, 4, 0 ) < 0) {
         ERR("failed to send to emuld\n");
     }
     if(send( s, (char*)send_buf, buf_size, 0 ) < 0) {
index b9d767f..4f34fab 100644 (file)
@@ -262,7 +262,7 @@ void maru_dump_backtrace(void *ptr, int depth)
 }
 
 #ifdef CONFIG_WIN32
-static LONG maru_unhandled_exception_filter(PEXCEPTION_POINTERS pExceptionInfo){
+static WINAPI LONG maru_unhandled_exception_filter(LPEXCEPTION_POINTERS pExceptionInfo){
     char module_buf[1024];
     DWORD dwException = pExceptionInfo->ExceptionRecord->ExceptionCode;
     ERR("%d\n ", (int)dwException);
index f2728d5..0d1c20b 100644 (file)
@@ -115,7 +115,7 @@ int inet_strtoip(const char*  str, uint32_t  *ip)
 int check_port_bind_listen(uint32_t port)
 {
     struct sockaddr_in addr;
-    int s, opt = 1;
+    int s = 0;
     int ret = -1;
     socklen_t addrlen = sizeof(addr);
     memset(&addr, 0, addrlen);
@@ -131,6 +131,7 @@ int check_port_bind_listen(uint32_t port)
     }
 
 #ifndef _WIN32
+    int opt = 1;
     ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
                     (char *)&opt, sizeof(int));
     if (ret < 0) {