Assorted warning fixes

This commit is contained in:
Jasmine Iwanek
2025-01-26 15:15:53 -05:00
parent a5bf0dc9c8
commit 5f273265ae
136 changed files with 1374 additions and 1291 deletions

View File

@@ -557,7 +557,7 @@ program_change(uint8_t midi_channel, uint8_t program, opl4_midi_t *opl4_midi)
}
static void
opl4_midi_thread(void *arg)
opl4_midi_thread(UNUSED(void *arg))
{
opl4_midi_t *opl4_midi = opl4_midi_cur;
uint32_t i = 0;
@@ -648,12 +648,13 @@ opl4_midi_msg(uint8_t *val)
}
void
opl4_midi_sysex(uint8_t *data, unsigned int len)
opl4_midi_sysex(UNUSED(uint8_t *data), UNUSED(unsigned int len))
{
//
}
void *
opl4_init(const device_t *info)
opl4_init(UNUSED(const device_t *info))
{
midi_device_t *dev;
extern void al_set_midi(int freq, int buf_size);

View File

@@ -328,7 +328,7 @@ emu8k_log(const char *fmt, ...)
static inline int16_t
EMU8K_READ(emu8k_t *emu8k, uint32_t addr)
{
const register emu8k_mem_pointers_t addrmem = { { addr } };
register const emu8k_mem_pointers_t addrmem = { { addr } };
return emu8k->ram_pointers[addrmem.hb_address][addrmem.lw_address];
}

View File

@@ -34,6 +34,7 @@
#include <86box/device.h>
#include <86box/timer.h>
#include <86box/snd_opl.h>
#include <86box/plat_unused.h>
#define RSM_FRAC 10
@@ -175,7 +176,7 @@ esfm_drv_set_do_cycles(void *priv, int8_t do_cycles)
}
static void *
esfm_drv_init(const device_t *info)
esfm_drv_init(UNUSED(const device_t *info))
{
esfm_drv_t *dev = (esfm_drv_t *) calloc(1, sizeof(esfm_drv_t));
dev->flags = FLAG_CYCLES | FLAG_OPL3;

View File

@@ -1671,7 +1671,7 @@ pas16_out(uint16_t port, uint8_t val, void *priv)
- A 16-bit sample always takes two ctr_clock() ticks.
*/
static uint16_t
pas16_dma_channel_read(pas16_t *pas16, int channel)
pas16_dma_channel_read(pas16_t *pas16, UNUSED(int channel))
{
int status;
uint16_t ret;

View File

@@ -87,10 +87,10 @@ sid_write(uint16_t addr, uint8_t val, UNUSED(void *priv))
#define CLOCK_DELTA(n) (int) (((14318180.0 * n) / 16.0) / (float) RESID_FREQ)
static void
fillbuf2(int &count, int16_t *buf, int len)
fillbuf2(int &count, int16_t *buf, UNUSED(int len))
{
int c;
c = psid->sid->clock(count, buf);
int c = psid->sid->clock(count, buf);
if (!c)
*buf = psid->last_sample;
psid->last_sample = *buf;

View File

@@ -1417,7 +1417,7 @@ sb_ct1745_mixer_reset(sb_t *sb)
}
static void
ess_base_write(uint16_t addr, uint8_t val, void *priv)
ess_base_write(uint16_t addr, UNUSED(uint8_t val), void *priv)
{
sb_t *ess = (sb_t *) priv;
@@ -1463,7 +1463,7 @@ ess_base_read(uint16_t addr, void *priv)
}
static void
ess_fm_midi_write(uint16_t addr, uint8_t val, void *priv)
ess_fm_midi_write(UNUSED(uint16_t addr), UNUSED(uint8_t val), void *priv)
{
sb_t *ess = (sb_t *) priv;
@@ -1471,7 +1471,7 @@ ess_fm_midi_write(uint16_t addr, uint8_t val, void *priv)
}
static uint8_t
ess_fm_midi_read(uint16_t addr, void *priv)
ess_fm_midi_read(UNUSED(uint16_t addr), void *priv)
{
sb_t *ess = (sb_t *) priv;

View File

@@ -94,13 +94,13 @@ ssi2001_close(void *priv)
}
static uint8_t
entertainer_read(uint16_t addr, void *priv)
entertainer_read(UNUSED(uint16_t addr), UNUSED(void *priv))
{
return 0xa5;
}
static void
entertainer_write(uint16_t addr, uint8_t val, void *priv)
entertainer_write(UNUSED(uint16_t addr), uint8_t val, void *priv)
{
entertainer_t *entertainer = (entertainer_t *) priv;
entertainer->regs = val;
@@ -163,15 +163,27 @@ static const device_config_t ssi2001_config[] = {
{ .description = "" }
}
},
{ "gameport", "Enable Game port", CONFIG_BINARY, "", 1 },
{ "", "", -1 }
{
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off
};
static const device_config_t entertainer_config[] = {
// clang-format off
{ "gameport", "Enable Game port", CONFIG_BINARY, "", 1 },
{ "", "", -1 }
{
.name = "gameport",
.description = "Enable Game port",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
},
{ .name = "", .description = "", .type = CONFIG_END }
// clang-format off
};