emulator: Fix compilation warnings
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 25 Jan 2013 07:19:17 +0000 (16:19 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 25 Jan 2013 07:19:17 +0000 (16:19 +0900)
maru_pm.c, maru_vga.c and 4 more files.

Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
hw/pc.h
hw/usb/dev-storage.c
hw/vga-pci.h
oslib-posix.c
tizen/src/hw/maru_pm.c
tizen/src/hw/maru_vga.c
tizen/src/maru_sdl_rotozoom.h

diff --git a/hw/pc.h b/hw/pc.h
index 374c775..e4db071 100644 (file)
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -189,11 +189,6 @@ static inline DeviceState *isa_vga_init(ISABus *bus)
     return &dev->qdev;
 }
 
-#ifdef CONFIG_MARU
-DeviceState *pci_maru_vga_init(PCIBus *bus);
-#endif
-
-
 int isa_vga_mm_init(target_phys_addr_t vram_base,
                     target_phys_addr_t ctrl_base, int it_shift,
                     MemoryRegion *address_space);
index 38788d9..0efd166 100644 (file)
@@ -605,8 +605,10 @@ static USBDevice *usb_msd_init(USBBus *bus, const char *filename)
     QemuOpts *opts;
     DriveInfo *dinfo;
     USBDevice *dev;
+#ifndef CONFIG_MARU
     const char *p1;
     char fmt[32];
+#endif
 
     /* parse -usbdevice disk: syntax into drive opts */
     snprintf(id, sizeof(id), "usb%d", nr++);
index 49abf13..2d02920 100644 (file)
@@ -9,4 +9,8 @@ DeviceState *pci_vga_init(PCIBus *bus);
 /* cirrus_vga.c */
 DeviceState *pci_cirrus_vga_init(PCIBus *bus);
 
+#ifdef CONFIG_MARU
+DeviceState *pci_maru_vga_init(PCIBus *bus);
+#endif
+
 #endif
index 09cec58..24b9207 100644 (file)
@@ -101,7 +101,9 @@ void *qemu_oom_check(void *ptr)
 
         snprintf(cmd, len, "%s %s %s %s=\"%s\"",
             JAVA_EXEFILE_PATH, JAVA_EXEOPTION, JAR_SKINFILE, JAVA_SIMPLEMODE_OPTION, _msg);
-        int ret = system(cmd);
+        if(system(cmd) == -1) {
+            // TODO: Handle error... 
+        }
 #endif
 
         abort();
index 804158c..d1d29f4 100644 (file)
@@ -39,6 +39,7 @@
 #include "range.h"
 #include "ioport.h"
 #include "debug_ch.h"
+#include "fw_cfg.h"
 
 
 //#define DEBUG
@@ -125,7 +126,7 @@ static void pm_tmr_timer(ACPIREGS *ar)
     pm_update_sci(s);
 }
 
-void maru_pm1_cnt_write(ACPIREGS *ar, uint16_t val)
+static void maru_pm1_cnt_write(ACPIREGS *ar, uint16_t val)
 {
     ar->pm1.cnt.cnt = val & ~(ACPI_BITMASK_SLEEP_ENABLE);
 
index c1f2a0a..89bebfb 100644 (file)
@@ -1598,12 +1598,6 @@ static void vga_invalidate_display(void *opaque)
     s->last_height = -1;
 }
 
-static void vga_reset(void *opaque)
-{
-    VGACommonState *s =  opaque;
-    vga_common_reset(s);
-}
-
 #define TEXTMODE_X(x)   ((x) % width)
 #define TEXTMODE_Y(x)   ((x) / width)
 #define VMEM2CHTYPE(v)  ((v & 0xff0007ff) | \
@@ -1779,6 +1773,13 @@ static void vga_update_text(void *opaque, console_ch_t *chardata)
 }
 
 
+#if 0
+static void vga_reset(void *opaque)
+{
+    VGACommonState *s =  opaque;
+    vga_common_reset(s);
+}
+
 static uint64_t vga_mem_read(void *opaque, target_phys_addr_t addr,
                              unsigned size)
 {
@@ -1803,6 +1804,7 @@ static int vga_common_post_load(void *opaque, int version_id)
     s->graphic_mode = -1;
     return 0;
 }
+#endif
 
 void maru_vga_common_init(VGACommonState *s)
 {
@@ -1959,6 +1961,7 @@ static const MemoryRegionPortio vbe_portio_list[] = {
 /********************************************************/
 /* vga screen dump */
 
+#if 0
 static int maru_ppm_save(const char *filename, struct DisplaySurface *ds)
 {
     FILE *f;
@@ -2002,6 +2005,7 @@ static int maru_ppm_save(const char *filename, struct DisplaySurface *ds)
     fclose(f);
     return 0;
 }
+#endif
 
 /* save the vga display in a PPM image even if no display is
    available */
index e6e7c33..9d236e1 100644 (file)
@@ -139,7 +139,7 @@ SDL_Surface *maru_rotozoom(SDL_Surface *rz_src, SDL_Surface *rz_dst, int angle)
 
     unsigned int *in = NULL;
     unsigned int *out = NULL;
-    unsigned int *row = NULL;
+//    unsigned int *row = NULL;
 
     switch(angle) {
         case 90:
@@ -168,7 +168,7 @@ SDL_Surface *maru_rotozoom(SDL_Surface *rz_src, SDL_Surface *rz_dst, int angle)
 
             for (i = 0; i < dst_height; i++, out += dst_width) {
                 row_index = (i * sy) >> SHIFT;
-                row    = in + (row_index * rz_src->w);
+//                row  = in + (row_index * rz_src->w);
 
                 for (j = 0; j < dst_width; j++) {
                     col_index = (sx * j) >> SHIFT;
@@ -182,7 +182,7 @@ SDL_Surface *maru_rotozoom(SDL_Surface *rz_src, SDL_Surface *rz_dst, int angle)
         case 90: /* landscape */
             for (i = 0; i < dst_height; i++) {
                 row_index  = (i * sy) >> SHIFT;
-                row = in + (row_index * rz_src->w);
+//                row = in + (row_index * rz_src->w);
                 
                 out = ((unsigned int *) rz_dst->pixels) + i;
 
@@ -200,7 +200,7 @@ SDL_Surface *maru_rotozoom(SDL_Surface *rz_src, SDL_Surface *rz_dst, int angle)
 
             for (i = 0; i < dst_height; i++, out += dst_width) {
                 row_index = ((dst_height - i - 1) * sy) >> SHIFT;
-                row = in + (row_index * rz_src->w);
+//                row = in + (row_index * rz_src->w);
 
                 for (j = 0; j < dst_width; j++) {
                     col_index = (sx * j) >> SHIFT;
@@ -214,7 +214,7 @@ SDL_Surface *maru_rotozoom(SDL_Surface *rz_src, SDL_Surface *rz_dst, int angle)
         case 270: /* reverse landscape */
             for (i = 0; i < dst_height; i++) {
                 row_index = ((dst_height - i - 1) * sy) >> SHIFT;
-                row = in + (row_index * rz_src->w);
+//                row = in + (row_index * rz_src->w);
 
                 out = ((unsigned int *) rz_dst->pixels) + i;