From: SeokYeon Hwang Date: Fri, 25 Jan 2013 07:19:17 +0000 (+0900) Subject: emulator: Fix compilation warnings X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1103^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfd0f5088af3a42e9d8ef24897bb236c64c401e5;p=sdk%2Femulator%2Fqemu.git emulator: Fix compilation warnings maru_pm.c, maru_vga.c and 4 more files. Signed-off-by: SeokYeon Hwang --- diff --git a/hw/pc.h b/hw/pc.h index 374c775b18..e4db0715b8 100644 --- 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); diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 38788d9943..0efd16658d 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -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++); diff --git a/hw/vga-pci.h b/hw/vga-pci.h index 49abf1309d..2d029203c0 100644 --- a/hw/vga-pci.h +++ b/hw/vga-pci.h @@ -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 diff --git a/oslib-posix.c b/oslib-posix.c index 09cec58c05..24b9207197 100644 --- a/oslib-posix.c +++ b/oslib-posix.c @@ -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(); diff --git a/tizen/src/hw/maru_pm.c b/tizen/src/hw/maru_pm.c index 804158c507..d1d29f44f3 100644 --- a/tizen/src/hw/maru_pm.c +++ b/tizen/src/hw/maru_pm.c @@ -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); diff --git a/tizen/src/hw/maru_vga.c b/tizen/src/hw/maru_vga.c index c1f2a0abd9..89bebfbc7f 100644 --- a/tizen/src/hw/maru_vga.c +++ b/tizen/src/hw/maru_vga.c @@ -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 */ diff --git a/tizen/src/maru_sdl_rotozoom.h b/tizen/src/maru_sdl_rotozoom.h index e6e7c33cde..9d236e11e9 100644 --- a/tizen/src/maru_sdl_rotozoom.h +++ b/tizen/src/maru_sdl_rotozoom.h @@ -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;