]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
trivial changes
authorFrode Solheim <frode-code@fengestad.no>
Tue, 29 Jul 2014 21:05:09 +0000 (23:05 +0200)
committerFrode Solheim <frode-code@fengestad.no>
Tue, 29 Jul 2014 22:04:46 +0000 (00:04 +0200)
16 files changed:
blitter.cpp
cia.cpp
cpummu30.cpp
drawing.cpp
events.cpp
gayle.cpp
include/arcadia.h
include/gfxfilter.h
include/statusline.h
include/zfile.h
keybuf.cpp
main.cpp
missing.cpp
scsiemul.cpp
scsitape.cpp
statusline.cpp

index 3a99358606bfb12d44e377306acd44f4ce4fc60a..bd987ac0459604edeb46840835def214f08732f8 100644 (file)
@@ -1520,7 +1520,7 @@ static void do_blitter2 (int hpos, int copper)
                                ch++;
                        if (blit_ch & 8)
                                ch++;
-                       write_log (_T("blitstart: %dx%d ch=%d %d*%d=%d d=%d f=%02X n=%d pc=%p l=%d dma=%04X %s\n"),
+                       write_log (_T("blitstart: %dx%d ch=%d %d*%d=%d d=%d f=%02x n=%d pc=%08x l=%d dma=%04x %s\n"),
                                blt_info.hblitsize, blt_info.vblitsize, ch, blit_diag[0], cycles, blit_diag[0] * cycles,
                                blitdesc ? 1 : 0, blitfill, dmaen (DMA_BLITPRI) ? 1 : 0, M68K_GETPC, blitline,
                                dmacon, ((dmacon & (DMA_MASTER | DMA_BLITTER)) == (DMA_MASTER | DMA_BLITTER)) ? _T("") : _T(" off!"));
diff --git a/cia.cpp b/cia.cpp
index b1dcbc87657af3a62daa3583c63f11a9c18d209e..1b36fff09c6d70665707fc353c1d589ca958cca8 100644 (file)
--- a/cia.cpp
+++ b/cia.cpp
@@ -2000,7 +2000,6 @@ static void write_battclock (void)
                return;
        struct zfile *f = zfile_fopen (currprefs.rtcfile, _T("wb"));
        if (f) {
-               uae_u8 zero[13] = { 0 };
                struct tm *ct;
                time_t t = time (0);
                t += currprefs.cs_rtc_adjust;
index 054852596a2eedafa7b2303c461e1b3f8b645c83..cb4ede410e63fdf351a8d5cfa0a702cc53c79e39 100644 (file)
@@ -96,7 +96,7 @@ typedef struct {
 
 
 /* MMU struct for 68030 */
-struct {
+static struct {
     
     /* Translation tables */
     struct {
index 0ea4b09ebf968218ab747aa4689bfeeccd362906..d36b114fb8683c3306c80ab250ce9112540fb979 100644 (file)
@@ -141,7 +141,7 @@ struct color_entry colors_for_drawing;
 /* The size of these arrays is pretty arbitrary; it was chosen to be "more
 than enough".  The coordinates used for indexing into these arrays are
 almost, but not quite, Amiga coordinates (there's a constant offset).  */
-union {
+static union {
        /* Let's try to align this thing. */
        double uupzuq;
        long int cruxmedo;
@@ -275,7 +275,7 @@ static void xlinecheck (unsigned int start, unsigned int end)
        }
 }
 #else
-#define xlinecheck
+#define xlinecheck(start, end)
 #endif
 
 static void clearbuffer (struct vidbuffer *dst)
@@ -2204,8 +2204,6 @@ static void do_flush_screen (struct vidbuffer *vb, int start, int stop)
 * form. */
 static void pfield_expand_dp_bplcon (void)
 {
-       static int b2;
-
        bplres = dp_for_drawing->bplres;
        bplplanecnt = dp_for_drawing->nr_planes;
        bplham = dp_for_drawing->ham_seen;
index a9ab94910a21dd692de70091d3cd467792d28b43..adc83386a00f06f20919b2f2c047734a533c8a62 100644 (file)
@@ -134,7 +134,7 @@ void MISC_handler (void)
                        }
                }
        }
-       if (mintime != ~0L) {
+       if (mintime != ~0UL) {
                eventtab[ev_misc].active = true;
                eventtab[ev_misc].oldcycles = ct;
                eventtab[ev_misc].evtime = ct + mintime;
index 54420a8daf1fec34d57b68017451e8e89fa7c02f..d9706226c3e247eb166e74a64ca16d7ce9916a5e 100644 (file)
--- a/gayle.cpp
+++ b/gayle.cpp
@@ -1098,7 +1098,6 @@ static void ide_do_command (struct ide_hdf *ide, uae_u8 cmd)
 static uae_u16 ide_get_data (struct ide_hdf *ide)
 {
        bool irq = false;
-       bool last = false;
        uae_u16 v;
 
        if (IDE_LOG > 4)
@@ -1189,7 +1188,6 @@ static void ide_put_data (struct ide_hdf *ide, uae_u16 v)
 static int get_gayle_ide_reg (uaecptr addr, struct ide_hdf **ide)
 {
        int ide2;
-       uaecptr a = addr;
        addr &= 0xffff;
        *ide = NULL;
        if (addr >= GAYLE_IRQ_4000 && addr <= GAYLE_IRQ_4000 + 1 && currprefs.cs_ide == IDE_A4000)
@@ -1372,7 +1370,6 @@ static uae_u32 gayle_read2 (uaecptr addr)
 {
        struct ide_hdf *ide = NULL;
        int ide_reg;
-       uae_u8 v = 0;
 
        addr &= 0xffff;
        if ((IDE_LOG > 3 && (addr != 0x2000 && addr != 0x2001 && addr != 0x3020 && addr != 0x3021 && addr != GAYLE_IRQ_1200)) || IDE_LOG > 5)
@@ -2008,11 +2005,9 @@ static struct ide_hdf *add_ide_unit (int ch, struct uaedev_config_info *ci)
 }
 
 static int pcmcia_common_size, pcmcia_attrs_size;
-static int pcmcia_common_mask;
 static uae_u8 *pcmcia_common;
 static uae_u8 *pcmcia_attrs;
 static int pcmcia_write_min, pcmcia_write_max;
-static int pcmcia_oddevenflip;
 static uae_u16 pcmcia_idedata;
 
 static int get_pcmcmia_ide_reg (uaecptr addr, int width, struct ide_hdf **ide)
@@ -2411,7 +2406,7 @@ static int initpcmcia (const TCHAR *path, int readonly, int type, int reset)
                if (!pcmcia_sram->hfd.drive_empty) {
                        pcmcia_common_size = pcmcia_sram->hfd.virtsize;
                        if (pcmcia_sram->hfd.virtsize > 4 * 1024 * 1024) {
-                               write_log (_T("PCMCIA SRAM: too large device, %d bytes\n"), pcmcia_sram->hfd.virtsize);
+                               write_log (_T("PCMCIA SRAM: too large device, %llu bytes\n"), pcmcia_sram->hfd.virtsize);
                                pcmcia_common_size = 4 * 1024 * 1024;
                        }
                        pcmcia_common = xcalloc (uae_u8, pcmcia_common_size);
@@ -2674,11 +2669,6 @@ void gayle_map_pcmcia (void)
        }
 }
 
-static int rl (uae_u8 *p)
-{
-       return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3]);
-}
-
 void gayle_free_units (void)
 {
        int i;
index 4761620a9986f67df6801826f14018f0da2eb50d..9225d230253f989cad43348c3240d9c2d0c4ab0c 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_ARCADIA_H
+#define UAE_ARCADIA_H
 
 #ifdef ARCADIA
 
@@ -26,4 +28,6 @@ extern int arcadia_flag, arcadia_coin[2];
 #define ARCADIA_BIOS 1
 #define ARCADIA_GAME 2
 
-#endif
\ No newline at end of file
+#endif
+
+#endif // UAE_ARCADIA_H
index 7fc4fcc455a2535cafd5e5ab6bac57e61d0a535b..141b481a4cbe9c2651aeed645f5d869817d480c5 100644 (file)
@@ -70,7 +70,7 @@ extern "C"
 struct uae_filter
 {
     int type, yuv, intmul;
-    TCHAR *name, *cfgname;
+    const TCHAR *name, *cfgname;
     int flags;
 };
 
index f4c197b325288483fd85139fa62ead200cc91573..1d7c37afd3ed4a9a40e8dd34f66e37cdc5b7af12 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef UAE_STATUSLINE_H
+#define UAE_STATUSLINE_H
 
 #define TD_PADX 4
 #define TD_PADY 2
@@ -36,3 +38,5 @@ extern void statusline_vsync(void);
 extern void statusline_updated(void);
 extern bool has_statusline_updated(void);
 extern const TCHAR *statusline_fetch(void);
+
+#endif // UAE_STATUSLINE_H
index 97192da4a1dcbdf6352dedce08ce33602a0ee2bb..f68c77075e83eca3f2466e47a9aff23e4d56d3c3 100644 (file)
@@ -6,6 +6,9 @@
   * (c) 1996 Samuel Devulder
   */
 
+#ifndef_UAE_ZFILE_H
+#define UAE_ZFILE_H
+
 struct zfile;
 struct zvolume;
 struct zdirectory;
@@ -146,4 +149,6 @@ struct mystat
        struct mytimeval mtime;
 };
 extern void timeval_to_amiga (struct mytimeval *tv, int* days, int* mins, int* ticks);
-extern void amiga_to_timeval (struct mytimeval *tv, int days, int mins, int ticks);
\ No newline at end of file
+extern void amiga_to_timeval (struct mytimeval *tv, int days, int mins, int ticks);
+
+#endif // UAE_ZFILE_H
index 50754e7c496c59b7cd2d456b919b2146689bf3d0..afc321d64e410e1738ed33027b6f8f123898e3c9 100644 (file)
@@ -56,10 +56,7 @@ int record_key (int kc)
 
 int record_key_direct (int kc)
 {
-       int fs = 0;
        int kpb_next = kpb_first + 1;
-       int k = kc >> 1;
-       int b = !(kc & 1);
 
        //write_log (_T("got kc %02X\n"), ((kc << 7) | (kc >> 1)) & 0xff);
        if (kpb_next == KEYBUF_SIZE)
index cf471ed268aeb9400a07a77670e6551378b56124..0f377c05f2f07ae8e0054c82deffef071c8230c7 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -716,7 +716,7 @@ static int diskswapper_cb (struct zfile *f, void *vrsd)
 static void parse_diskswapper (const TCHAR *s)
 {
        TCHAR *tmp = my_strdup (s);
-       TCHAR *delim = _T(",");
+       const TCHAR *delim = _T(",");
        TCHAR *p1, *p2;
        int num = 0;
 
index c63538ad5283705aaef1aa1f949e355156bbcd47..a0193362143cc8687cca3309c9da59855fda46ae 100644 (file)
@@ -15,7 +15,7 @@
 
 TCHAR *my_strdup (const TCHAR *s)
 {
-       TCHAR *x = (char*)xmalloc(strlen((TCHAR *)s) + 1);
+       TCHAR *x = (char*)malloc(strlen((TCHAR *)s) + 1);
        strcpy(x, (TCHAR *)s);
        return x;
 }
index 66e35408bee08466c0f3df51612462adfb29eed7..1aa3fda86af4eaf8c93cd7b79bee1967ec46ac29 100644 (file)
@@ -122,7 +122,7 @@ static struct priv_devstruct *getpdevstruct (uaecptr request)
        return &pdevst[i];
 }
 
-static TCHAR *getdevname (int type)
+static const TCHAR *getdevname (int type)
 {
        switch (type) {
        case UAEDEV_SCSI_ID:
@@ -1580,4 +1580,4 @@ uae_u8 *restore_scsidev (uae_u8 *src)
                }
        }
        return src;
-}
\ No newline at end of file
+}
index de05e2d17700ad33375c07da2db54489f8501926..43f522fec5f7042572c00a7e9d4bd55016319c1f 100644 (file)
@@ -381,7 +381,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
        case 0x10: /* WRITE FILEMARK */
                len = rl (cmdbuf + 1) & 0xffffff;
                if (log_tapeemu)
-                       write_log (_T("TAPEEMU WRITE FILEMARK %d\n"), len);
+                       write_log (_T("TAPEEMU WRITE FILEMARK %lld\n"), len);
                if (notape (tape))
                        goto notape;
                if (tape->unloaded)
@@ -400,7 +400,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
                if (cmdbuf[1] & 1)
                        len *= tape->blocksize;
                if (log_tapeemu)
-                       write_log (_T("TAPEEMU WRITE %d (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
+                       write_log (_T("TAPEEMU WRITE %lld (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
                if (notape (tape))
                        goto notape;
                if (tape->unloaded)
@@ -419,7 +419,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
                if (cmdbuf[1] & 1)
                        len *= tape->blocksize;
                if (log_tapeemu)
-                       write_log (_T("TAPEEMU READ %d (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
+                       write_log (_T("TAPEEMU READ %lld (%d, %d)\n"), len, rl (cmdbuf + 1) & 0xffffff, cmdbuf[1] & 1);
                if (notape (tape))
                        goto notape;
                if (tape->unloaded)
@@ -460,7 +460,7 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
                        s[13] = 1; /* File Mark detected */
                        ls = 0x12;
                        if (log_tapeemu)
-                               write_log (_T("TAPEEMU READ FILE END, %d remaining\n"), len - scsi_len);
+                               write_log (_T("TAPEEMU READ FILE END, %lld remaining\n"), len - scsi_len);
                }
        break;
 
@@ -469,7 +469,6 @@ int scsi_tape_emulate (struct scsi_data_tape *tape, uae_u8 *cmdbuf, int scsi_cmd
        {
                uae_u8 *p;
                int maxlen;
-               bool pcodeloop = false;
                bool sense10 = cmdbuf[0] == 0x5a;
                int totalsize, bdsize;
                int pc = cmdbuf[2] >> 6;
@@ -673,4 +672,4 @@ notape:
                }
        }
        return status;
-}
\ No newline at end of file
+}
index 4a695c0cada1e5cec3168c9831b2aa32dc650d8f..e20dd2c3f62f63ca55fe034c5e5717ee18478f52 100644 (file)
@@ -94,7 +94,7 @@ void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u
        for (led = 0; led < LED_MAX; led++) {
                int side, pos, num1 = -1, num2 = -1, num3 = -1, num4 = -1;
                int x, c, on = 0, am = 2;
-               xcolnr on_rgb, on_rgb2, off_rgb, pen_rgb;
+               xcolnr on_rgb = 0, on_rgb2 = 0, off_rgb = 0, pen_rgb = 0;
                int half = 0;
 
                if (!(currprefs.leds_on_screen_mask[picasso_on ? 1 : 0] & (1 << led)))