Skip to content

Commit

Permalink
trivial changes in several modules
Browse files Browse the repository at this point in the history
  • Loading branch information
FrodeSolheim committed Sep 4, 2015
1 parent 3def4af commit add7f46
Show file tree
Hide file tree
Showing 59 changed files with 299 additions and 205 deletions.
4 changes: 2 additions & 2 deletions a2091.cpp
Expand Up @@ -3422,7 +3422,7 @@ void gvp_s2_add_accelerator_scsi_unit(int ch, struct uaedev_config_info *ci, str
add_scsi_device(&wd->scsis[ch], ch, ci, rc);
}

void a2091_free_device (struct wd_state *wd)
static void a2091_free_device (struct wd_state *wd)
{
freencrunit(wd);
}
Expand Down Expand Up @@ -3586,7 +3586,7 @@ addrbank *a2090_init (struct romconfig *rc)
return wd->bank;
}

void gvp_free_device (struct wd_state *wd)
static void gvp_free_device (struct wd_state *wd)
{
freencrunit(wd);
}
Expand Down
1 change: 0 additions & 1 deletion ar.cpp
Expand Up @@ -213,7 +213,6 @@
#include "savestate.h"
#include "crc32.h"
#include "akiko.h"
#include "picasso96.h"

#define DEBUG
#ifdef DEBUG
Expand Down
2 changes: 1 addition & 1 deletion archivers/chd/corefile.h
Expand Up @@ -116,7 +116,7 @@ int core_fputs(core_file *f, const TCHAR *s);

/* printf-style text write to a file */
int core_vfprintf(core_file *f, const TCHAR *fmt, va_list va);
int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...) ATTR_PRINTF(2,3);
int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...);



Expand Down
2 changes: 1 addition & 1 deletion archivers/dms/u_deep.cpp
Expand Up @@ -48,7 +48,7 @@ static USHORT son[T]; /* pointers to child nodes (son[], son[] + 1) */



void Init_DEEP_Tabs(void){
static void Init_DEEP_Tabs(void){
USHORT i, j;

for (i = 0; i < N_CHAR; i++) {
Expand Down
2 changes: 1 addition & 1 deletion archivers/zip/unzip.cpp
Expand Up @@ -888,7 +888,7 @@ extern int ZEXPORT unzOpenCurrentFile (unzFile file)

if ((s->cur_file_info.compression_method!=0) &&
(s->cur_file_info.compression_method!=Z_DEFLATED)) {
write_log (_T("ZIP: unknown compression method %lld\n"), s->cur_file_info.compression_method);
write_log (_T("ZIP: unknown compression method %ld\n"), s->cur_file_info.compression_method);
err=UNZ_BADZIPFILE;
}
Store = s->cur_file_info.compression_method==0;
Expand Down
10 changes: 5 additions & 5 deletions audio.cpp
Expand Up @@ -899,7 +899,7 @@ void sample16ss_handler (void)
/* This interpolator examines sample points when Paula switches the output
* voltage and computes the average of Paula's output */

void sample16ss_anti_handler (void)
static void sample16ss_anti_handler (void)
{
int data0, data1, data2, data3;
int datas[AUDIO_CHANNELS_PAULA];
Expand Down Expand Up @@ -949,7 +949,7 @@ static void sample16si_anti_handler (void)
check_sound_buffers ();
}

void sample16ss_sinc_handler (void)
static void sample16ss_sinc_handler (void)
{
int data0, data1, data2, data3;
int datas[AUDIO_CHANNELS_PAULA];
Expand Down Expand Up @@ -1346,7 +1346,7 @@ static void loaddat (int nr, bool modper)
return;
if (modper && audap) {
if (cdp->dat == 0)
cdp[1].per = 65536 * CYCLE_UNIT;
cdp[1].per = 65536 * CYCLE_UNIT;
else if (cdp->dat > PERIOD_MIN)
cdp[1].per = cdp->dat * CYCLE_UNIT;
else
Expand Down Expand Up @@ -1588,7 +1588,7 @@ static void audio_state_channel2 (int nr, bool perfin)
}
}

void audio_state_cda(void);
static void audio_state_cda(void);

static void audio_state_channel (int nr, bool perfin)
{
Expand Down Expand Up @@ -2306,7 +2306,7 @@ void audio_enable_sndboard(bool enable)
audio_set_extra_channels();
}

void audio_enable_cda(bool enable)
static void audio_enable_cda(bool enable)
{
struct audio_channel_data *acd = audio_channel + AUDIO_CHANNEL_CDA_LEFT;
if (!enable) {
Expand Down
6 changes: 0 additions & 6 deletions blitter.cpp
Expand Up @@ -341,7 +341,6 @@ int blitter_channel_state (void)
return channel_state (blit_cyclecounter);
}

extern int is_bitplane_dma (int hpos);
STATIC_INLINE int canblit (int hpos)
{
if (!dmaen (DMA_BLITTER))
Expand Down Expand Up @@ -953,21 +952,16 @@ STATIC_INLINE uae_u16 blitter_doblit (void)

STATIC_INLINE void blitter_doddma (int hpos)
{
int wd;
uae_u16 d;

wd = 0;
if (blit_dmacount2 == 0) {
d = blitter_doblit ();
wd = -1;
} else if (ddat2use) {
d = ddat2;
ddat2use = 0;
wd = 2;
} else if (ddat1use) {
d = ddat1;
ddat1use = 0;
wd = 1;
} else {
static int warn = 10;
if (warn > 0) {
Expand Down
2 changes: 1 addition & 1 deletion blkdev_cdimage.cpp
Expand Up @@ -431,7 +431,7 @@ static void audio_unpack (struct cdunit *cdu, struct cdtoc *t)
static volatile int cda_bufon[2];
static cda_audio *cda;

void next_cd_audio_buffer_callback(int bufnum)
static void next_cd_audio_buffer_callback(int bufnum)
{
uae_sem_wait(&play_sem);
if (bufnum >= 0) {
Expand Down
8 changes: 4 additions & 4 deletions bsdsocket.cpp
Expand Up @@ -26,7 +26,7 @@

#ifdef BSDSOCKET

int log_bsd;
int log_bsd = 0;
struct socketbase *socketbases;
static uae_u32 SockLibBase;

Expand Down Expand Up @@ -169,17 +169,17 @@ bool checksd(TrapContext *context, SB, int sd)
if (iCounter != sd) {
if (getsock(sb,iCounter) == s) {
releasesock(context, sb, sd);
return TRUE;
return true;
}
}
}
for (iCounter = 0; iCounter < SOCKPOOLSIZE; iCounter++) {
if (s == sockdata->sockpoolsocks[iCounter])
return TRUE;
return true;
}
}
BSDTRACE((_T("checksd FALSE s 0x%x sd %d\n"),s,sd));
return FALSE;
return false;
}

void setsd(TrapContext *context, SB, int sd, SOCKET_TYPE s)
Expand Down
2 changes: 1 addition & 1 deletion catweasel.cpp
Expand Up @@ -714,4 +714,4 @@ int catweasel_detect (void)
return FALSE;
}

#endif
#endif
2 changes: 1 addition & 1 deletion cd32_fmv.cpp
Expand Up @@ -1371,7 +1371,7 @@ void cd32_fmv_set_sync(double svpos, double adjust)
fmv_syncadjust = adjust;
}

void fmv_next_cd_audio_buffer_callback(int bufnum)
static void fmv_next_cd_audio_buffer_callback(int bufnum)
{
uae_sem_wait(&play_sem);
if (bufnum >= 0) {
Expand Down
3 changes: 1 addition & 2 deletions cia.cpp
Expand Up @@ -2207,7 +2207,6 @@ static uae_u32 REGPARAM2 clock_wget (uaecptr addr)

static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
{
time_t t;
struct tm *ct;
uae_u8 v = 0;

Expand All @@ -2229,7 +2228,7 @@ static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
v = regs.irc >> 8;
return v;
}
t = time (0);
time_t t = time (0);
t += currprefs.cs_rtc_adjust;
ct = localtime (&t);
addr >>= 2;
Expand Down
7 changes: 4 additions & 3 deletions cpuboard.cpp
Expand Up @@ -946,10 +946,11 @@ static void cyberstorm_maprom(void)
{
if (a3000hmem_bank.allocated <= 2 * 524288)
return;
if (maprom_state && is_ppc())
if (maprom_state && is_ppc()) {
map_banks(&blizzardmaprom2_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
else
} else {
map_banks(&blizzardmaprom_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
}
}

static void cyberstormmk2_maprom(void)
Expand Down Expand Up @@ -1710,7 +1711,7 @@ void cpuboard_init(void)
mapped_malloc(&blizzardmaprom_bank);

} else if (is_csmk3()) {

blizzardram_bank.start = CS_RAM_BASE;
blizzardram_bank.allocated = cpuboard_size;
blizzardram_bank.mask = blizzardram_bank.allocated - 1;
Expand Down
6 changes: 3 additions & 3 deletions cpummu.cpp
Expand Up @@ -293,7 +293,7 @@ static void mmu_dump_table(const char * label, uaecptr root_ptr)
#endif

/* {{{ mmu_dump_atc */
void mmu_dump_atc(void)
static void mmu_dump_atc(void)
{

}
Expand Down Expand Up @@ -750,7 +750,7 @@ uae_u32 REGPARAM2 mmu_get_ilong_unaligned(uaecptr addr)
return res;
}

uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
static uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
{
uae_u16 res;

Expand All @@ -768,7 +768,7 @@ uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
return res;
}

uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
static uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
{
uae_u32 res;

Expand Down
7 changes: 4 additions & 3 deletions cpummu30.cpp
Expand Up @@ -1700,7 +1700,8 @@ uae_u32 mmu030_get_long_atc(uaecptr addr, int l, uae_u32 fc) {

return phys_get_long(physical_addr);
}
uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {

static uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {
uae_u32 page_index = addr & mmu030.translation.page.mask;
uae_u32 addr_mask = mmu030.translation.page.imask;

Expand Down Expand Up @@ -1738,7 +1739,7 @@ uae_u16 mmu030_get_word_atc(uaecptr addr, int l, uae_u32 fc) {
return phys_get_word(physical_addr);
}

uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
static uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
uae_u32 page_index = addr & mmu030.translation.page.mask;
uae_u32 addr_mask = mmu030.translation.page.imask;

Expand Down Expand Up @@ -1800,6 +1801,7 @@ void mmu030_put_atc_generic(uaecptr addr, uae_u32 val, int l, uae_u32 fc, int si
phys_put_long(physical_addr, val);

}

uae_u32 mmu030_get_atc_generic(uaecptr addr, int l, uae_u32 fc, int size, int flags, bool checkwrite) {
uae_u32 page_index = addr & mmu030.translation.page.mask;
uae_u32 addr_mask = mmu030.translation.page.imask;
Expand Down Expand Up @@ -2026,7 +2028,6 @@ uae_u8 mmu030_get_byte(uaecptr addr, uae_u32 fc) {
}
}


/* Not commonly used access function */
void mmu030_put_generic(uaecptr addr, uae_u32 val, uae_u32 fc, int size, int accesssize, int flags) {

Expand Down
2 changes: 1 addition & 1 deletion crc32.cpp
Expand Up @@ -355,4 +355,4 @@ const TCHAR *get_sha1_txt (void *vinput, int len)
}
*p = 0;
return outtxt;
}
}
1 change: 1 addition & 0 deletions diskutil.cpp
Expand Up @@ -2,6 +2,7 @@
#include "sysdeps.h"

#include "crc32.h"
#include "diskutil.h"

#define MFMMASK 0x55555555
static uae_u32 getmfmlong (uae_u16 * mbuf)
Expand Down
1 change: 1 addition & 0 deletions dongle.cpp
Expand Up @@ -12,6 +12,7 @@
#include "sysdeps.h"

#include "options.h"
#include "dongle.h"
#include "events.h"
#include "uae.h"

Expand Down
8 changes: 4 additions & 4 deletions drawing.cpp
Expand Up @@ -308,7 +308,7 @@ static void clearbuffer (struct vidbuffer *dst)
}
}

void reset_decision_table (void)
static void reset_decision_table (void)
{
for (int i = 0; i < sizeof linestate / sizeof *linestate; i++) {
linestate[i] = LINE_UNDECIDED;
Expand Down Expand Up @@ -1039,11 +1039,11 @@ STATIC_INLINE void fill_line_16 (uae_u8 *buf, int start, int stop, bool blank)
unsigned int i;
unsigned int rem = 0;
xcolnr col = getbgc (blank);
if (((long)&b[start]) & 1)
if (((uintptr_t)&b[start]) & 1)
b[start++] = (uae_u16) col;
if (start >= stop)
return;
if (((long)&b[stop]) & 1) {
if (((uintptr_t)&b[stop]) & 1) {
rem++;
stop--;
}
Expand Down Expand Up @@ -2371,7 +2371,7 @@ void init_row_map (void)
oldgenlock = init_genlock_data;
}

void init_aspect_maps (void)
static void init_aspect_maps (void)
{
int i, maxl, h;

Expand Down

0 comments on commit add7f46

Please sign in to comment.