]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Trivial compilation warning fixes (logging, const, static)
authorFrode Solheim <frode@fs-uae.net>
Wed, 23 Sep 2015 20:38:39 +0000 (22:38 +0200)
committerFrode Solheim <frode@fs-uae.net>
Wed, 23 Sep 2015 20:38:39 +0000 (22:38 +0200)
a2091.cpp
cia.cpp
disk.cpp
gfxboard.cpp
idecontrollers.cpp
include/ide.h
mame/a2410.cpp
ncr9x_scsi.cpp
newcpu.cpp

index 6340bbcfb2db788fb5be61c4e591a75df3ebb1e4..e8bbb27c8c79f76cbae3d12058f9a0c53457d0a6 100644 (file)
--- a/a2091.cpp
+++ b/a2091.cpp
@@ -1846,7 +1846,7 @@ static void a2090_st506(struct wd_state *wd, uae_u8 b)
        }
        uaecptr cbp = wd->cdmac.c8727_st506_cb << 9;
        if (!valid_address(cbp, 16)) {
-               write_log(_T("Invalid ST-506 command block address %08x\n"), cb);
+               write_log(_T("Invalid ST-506 command block address %08x\n"), cbp);
                return;
        }
        for (int i = 0; i < sizeof cb; i++) {
diff --git a/cia.cpp b/cia.cpp
index e78c3cde76b6dc8face836cf84fd639ee8cad11c..5ae61a5a8ba65344e14a294e25628306e9544577 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -612,7 +612,7 @@ static void do_tod_hack (int dotod)
        if (rate <= 0)
                return;
        if (rate != oldrate || (ciaatod & 0xfff) != (tod_hack_tod_last & 0xfff)) {
-               write_log (_T("TOD HACK reset %d,%d %d,%d\n"), rate, oldrate, ciaatod, tod_hack_tod_last);
+               write_log (_T("TOD HACK reset %d,%d %ld,%lld\n"), rate, oldrate, ciaatod, tod_hack_tod_last);
                tod_hack_reset ();
                oldrate = rate;
                docount = 1;
index ddd89aaf2e23ac515c37f9251d641ba8af08640c..7446e1060d459f239ae688ccec615bd8153c46b2 100644 (file)
--- a/disk.cpp
+++ b/disk.cpp
@@ -1066,7 +1066,7 @@ static void update_disk_statusline(int num)
        drive *drv = &floppy[num];
        if (!drv->diskfile)
                return;
-       TCHAR *fname = zfile_getoriginalname(drv->diskfile);
+       const TCHAR *fname = zfile_getoriginalname(drv->diskfile);
        if (!fname)
                fname = zfile_getname(drv->diskfile);
        if (!fname)
@@ -2955,7 +2955,7 @@ void DISK_select (uae_u8 data)
                        if ((prev_data & 0x04) != (data & 0x04))
                                write_log (_T(" side %d "), (data & 0x04) ? 1 : 0);
                } else {
-                       write_log (_T(" %d%d%d%d% "), (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
+                       write_log (_T(" %d%d%d%d "), (selected & 1) ? 0 : 1, (selected & 2) ? 0 : 1, (selected & 4) ? 0 : 1, (selected & 8) ? 0 : 1);
                        if ((prev_data & 0x80) != (data & 0x80))
                                write_log (_T(" dskmotor %d "), (data & 0x80) ? 1 : 0);
                        if ((prev_data & 0x02) != (data & 0x02))
@@ -4694,7 +4694,7 @@ int disk_prevnext (int drive, int dir)
        return 1;
 }
 
-int getdebug(void)
+static int getdebug(void)
 {
        return floppy[0].mfmpos;
 }
index 99f97da29c8eb7c7a5681953392a737f77984124..b7f15a810bce6f7bfd57a8ddc82657dd9a82997c 100644 (file)
@@ -83,8 +83,8 @@ static bool memlogw = false;
 struct gfxboard
 {
        const TCHAR *name;
-       TCHAR *manufacturername;
-       TCHAR *configname;
+       const TCHAR *manufacturername;
+       const TCHAR *configname;
        int manufacturer;
        int model_memory;
        int model_registers;
index 717be7f7aa1104837d12be2a3cb11072037a6743..a0f724d77c7c940401f748d8b13f3d7da1db66c9 100644 (file)
@@ -1462,7 +1462,7 @@ static addrbank *x86_at_hd_init(struct romconfig *rc, int type)
        ide->configured = 1;
        ide->bank = &ide_bank_generic;
 
-       struct zfile *f = read_device_from_romconfig(rc, NULL);
+       struct zfile *f = read_device_from_romconfig(rc, 0);
        if (f) {
                x86_xt_ide_bios(f, rc);
                zfile_fclose(f);
index 4807b6485b41792ca06b1ebac7fca9a5b4cfd9d6..e65d8ff6301e0d296dee60c27471bef3befdba5a 100644 (file)
@@ -134,28 +134,28 @@ uae_u8 *ide_save_state(uae_u8 *dst, struct ide_hdf *ide);
 uae_u8 *ide_restore_state(uae_u8 *src, struct ide_hdf *ide);
 
 #define IDE_MEMORY_FUNCTIONS(x, y, z) \
-void REGPARAM2 x ## _bput(uaecptr addr, uae_u32 b) \
+static void REGPARAM2 x ## _bput(uaecptr addr, uae_u32 b) \
 { \
        y ## _write_byte(z, addr, b); \
 } \
-void REGPARAM2 x ## _wput(uaecptr addr, uae_u32 b) \
+static void REGPARAM2 x ## _wput(uaecptr addr, uae_u32 b) \
 { \
        y ## _write_word(z, addr, b); \
 } \
-void REGPARAM2 x ## _lput(uaecptr addr, uae_u32 b) \
+static void REGPARAM2 x ## _lput(uaecptr addr, uae_u32 b) \
 { \
        y ## _write_word(z, addr, b >> 16); \
        y ## _write_word(z, addr + 2, b); \
 } \
-uae_u32 REGPARAM2 x ## _bget(uaecptr addr) \
+static uae_u32 REGPARAM2 x ## _bget(uaecptr addr) \
 { \
 return y ## _read_byte(z, addr); \
 } \
-uae_u32 REGPARAM2 x ## _wget(uaecptr addr) \
+static uae_u32 REGPARAM2 x ## _wget(uaecptr addr) \
 { \
 return y ## _read_word(z, addr); \
 } \
-uae_u32 REGPARAM2 x ## _lget(uaecptr addr) \
+static uae_u32 REGPARAM2 x ## _lget(uaecptr addr) \
 { \
        uae_u32 v = y ## _read_word(z, addr) << 16; \
        v |= y ## _read_word(z, addr + 2); \
index 6960ced06a7f75c6d3ce4a08c54e7720b53ece3c..fd7a67e0b393311435bf366f4ac5692ae2999939 100644 (file)
@@ -17,6 +17,7 @@
 #include "picasso96.h"
 #include "statusline.h"
 #include "newcpu.h"
+#include "gfxboard.h"
 
 static int tms_vp, tms_hp;
 rectangle tms_rectangle;
index a0904ce0c048f4211328666503d2eb52c3c8b581..a53d121cf933639e1d19e2d4199cc23a7d70f157 100644 (file)
@@ -1344,7 +1344,7 @@ static uae_u32 REGPARAM2 ncr9x_generic_lget (uaecptr addr)
                return ncr9x_lget(ncr, addr);
        return 0;
 }
-uae_u8 *REGPARAM2 ncr9x_generic_xlate(uaecptr addr)
+static uae_u8 *REGPARAM2 ncr9x_generic_xlate(uaecptr addr)
 {
        struct ncr9x_state *ncr = getscsiboard(addr);
        if (!ncr)
@@ -1353,7 +1353,7 @@ uae_u8 *REGPARAM2 ncr9x_generic_xlate(uaecptr addr)
        return ncr->rom + addr;
 
 }
-int REGPARAM2 ncr9x_generic_check(uaecptr a, uae_u32 b)
+static int REGPARAM2 ncr9x_generic_check(uaecptr a, uae_u32 b)
 {
        struct ncr9x_state *ncr = getscsiboard(a);
        if (!ncr)
index 079f811629087c548e6316015464a6f2b29da4cc..9e4e47683c3f1e07f015edc06c0a6ae346499c85 100644 (file)
@@ -1557,7 +1557,7 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode
                        else
                                _stprintf (offtxt, _T("$%04x"), disp16);
                        addr = m68k_areg (regs, reg) + disp16;
-                       _stprintf (buffer, _T("(A%d, %s) == $%08x"), reg, offtxt, (unsigned long)addr);
+                       _stprintf (buffer, _T("(A%d, %s) == $%08x"), reg, offtxt, addr);
                }
                break;
        case Ad8r:
@@ -1601,7 +1601,7 @@ static uaecptr ShowEA (void *f, uaecptr pc, uae_u16 opcode, int reg, amodes mode
        case PC16:
                disp16 = get_iword_debug (pc); pc += 2;
                addr += (uae_s16)disp16;
-               _stprintf (buffer, _T("(PC,$%04x) == $%08x"), disp16 & 0xffff, (unsigned long)addr);
+               _stprintf (buffer, _T("(PC,$%04x) == $%08x"), disp16 & 0xffff, addr);
                break;
        case PC8r:
                dp = get_iword_debug (pc); pc += 2;
@@ -3984,7 +3984,7 @@ static void m68k_run_1_ce (void)
 cont:
                                if (cputrace.needendcycles) {
                                        cputrace.needendcycles = 0;
-                                       write_log (_T("STARTCYCLES=%08x ENDCYCLES=%08x\n"), cputrace.startcycles, get_cycles ());
+                                       write_log (_T("STARTCYCLES=%08x ENDCYCLES=%08lx\n"), cputrace.startcycles, get_cycles ());
                                        log_dma_record ();
                                }