mirror of
https://github.com/holub/mame
synced 2025-06-07 05:13:46 +03:00
fixes for variables set but not used
This commit is contained in:
parent
74004a24e3
commit
467a116884
@ -1196,6 +1196,11 @@ project "bimg"
|
||||
end
|
||||
end
|
||||
|
||||
configuration { "gmake" }
|
||||
buildoptions {
|
||||
"-Wno-unused-but-set-variable",
|
||||
}
|
||||
|
||||
defines {
|
||||
"__STDC_LIMIT_MACROS",
|
||||
"__STDC_FORMAT_MACROS",
|
||||
@ -2220,6 +2225,11 @@ project "asmjit"
|
||||
end
|
||||
end
|
||||
|
||||
configuration { "gmake" }
|
||||
buildoptions {
|
||||
"-Wno-unused-but-set-variable",
|
||||
}
|
||||
|
||||
files {
|
||||
MAME_DIR .. "3rdparty/asmjit/src/asmjit/asmjit.h",
|
||||
MAME_DIR .. "3rdparty/asmjit/src/asmjit/core.h",
|
||||
|
@ -6564,7 +6564,7 @@ ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p10(OPS_32)
|
||||
ARCOMPACT_RETTYPE arcompact_device::arcompact_handle04_21_p11_m0(OPS_32) // Jcc.D (no link, delay)
|
||||
{
|
||||
int size = 4;
|
||||
uint32_t limm;
|
||||
[[maybe_unused]] uint32_t limm;
|
||||
int got_limm = 0;
|
||||
|
||||
COMMON32_GET_creg
|
||||
|
@ -57,12 +57,12 @@ debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_up
|
||||
throw std::bad_alloc();
|
||||
|
||||
// count the number of comments
|
||||
int total_comments = 0;
|
||||
for(auto &source : m_source_list)
|
||||
{
|
||||
const debug_view_disasm_source &dasmsource = downcast<const debug_view_disasm_source &>(*source);
|
||||
total_comments += dasmsource.device()->debug()->comment_count();
|
||||
}
|
||||
//int total_comments = 0;
|
||||
//for(auto &source : m_source_list)
|
||||
//{
|
||||
//const debug_view_disasm_source &dasmsource = downcast<const debug_view_disasm_source &>(*source);
|
||||
//total_comments += dasmsource.device()->debug()->comment_count();
|
||||
//}
|
||||
|
||||
// configure the view
|
||||
m_total.y = DEFAULT_DASM_LINES;
|
||||
|
@ -85,7 +85,7 @@ bool dfi_format::load(util::random_read &io, uint32_t form_factor, const std::ve
|
||||
std::vector<uint8_t> data;
|
||||
int onerev_time = 0; // time for one revolution, used to guess clock and rpm for DFE2 files
|
||||
unsigned long clock_rate = 100000000; // sample clock rate in megahertz
|
||||
int rpm=360; // drive rpm
|
||||
[[maybe_unused]] int rpm=360; // drive rpm
|
||||
while(pos < size) {
|
||||
uint8_t h[10];
|
||||
io.read_at(pos, h, 10, actual);
|
||||
@ -161,8 +161,6 @@ bool dfi_format::load(util::random_read &io, uint32_t form_factor, const std::ve
|
||||
osd_printf_verbose("dfi_dsk: Actual rpm based on index: %f\n", ((double)clock_rate/(double)onerev_time)*60);
|
||||
}
|
||||
|
||||
rpm += 0; // HACK: prevent GCC 4.6+ from warning "variable set but unused"
|
||||
|
||||
if(!index_time)
|
||||
index_time = total_time;
|
||||
|
||||
|
@ -88,7 +88,7 @@ bool fdd_format::load(util::random_read &io, uint32_t form_factor, const std::ve
|
||||
|
||||
for (int track = 0; track < 160; track++)
|
||||
{
|
||||
int curr_num_sec = 0, curr_track_size = 0;
|
||||
int curr_num_sec = 0; [[maybe_unused]] int curr_track_size = 0;
|
||||
for (int sect = 0; sect < 26; sect++)
|
||||
{
|
||||
// read sector map for this sector
|
||||
|
@ -570,7 +570,7 @@ int ti99_floppy_format::get_sectors(const std::vector<bool> &bitstream, int enco
|
||||
int seccount = 0;
|
||||
uint16_t shift_reg = 0;
|
||||
uint8_t databyte = 0;
|
||||
uint8_t curbyte = 0;
|
||||
[[maybe_unused]] uint8_t curbyte = 0;
|
||||
int rep = 0;
|
||||
int cursect = 0;
|
||||
|
||||
|
@ -119,7 +119,7 @@ std::vector<uint8_t> vtech_common_format::flux_to_image(floppy_image *image)
|
||||
int pos = 0;
|
||||
int count = 0;
|
||||
uint8_t *dest = nullptr;
|
||||
uint16_t checksum = 0;
|
||||
[[maybe_unused]] uint16_t checksum = 0;
|
||||
uint64_t buf = 0;
|
||||
sz = bitstream.size();
|
||||
if(sz < 128)
|
||||
@ -283,7 +283,7 @@ bool vtech_dsk_format::load(util::random_read &io, uint32_t form_factor, const s
|
||||
|
||||
int mode = 0;
|
||||
int count = 0;
|
||||
uint16_t checksum = 0;
|
||||
[[maybe_unused]] uint16_t checksum = 0;
|
||||
uint64_t buf = 0;
|
||||
uint8_t *dest = nullptr;
|
||||
|
||||
|
@ -881,8 +881,8 @@ void cobra_renderer::render_color_scan(int32_t scanline, const extent_t &extent,
|
||||
float dgg = extent.param[POLY_G].dpdx;
|
||||
float gb = extent.param[POLY_B].start;
|
||||
float dgb = extent.param[POLY_B].dpdx;
|
||||
float ga = extent.param[POLY_A].start;
|
||||
float dga = extent.param[POLY_A].dpdx;
|
||||
[[maybe_unused]] float ga = extent.param[POLY_A].start;
|
||||
[[maybe_unused]] float dga = extent.param[POLY_A].dpdx;
|
||||
|
||||
uint32_t zmode = extradata.zmode;
|
||||
|
||||
@ -967,8 +967,8 @@ void cobra_renderer::render_texture_scan(int32_t scanline, const extent_t &exten
|
||||
float dgg = extent.param[POLY_G].dpdx;
|
||||
float gb = extent.param[POLY_B].start;
|
||||
float dgb = extent.param[POLY_B].dpdx;
|
||||
float ga = extent.param[POLY_A].start;
|
||||
float dga = extent.param[POLY_A].dpdx;
|
||||
[[maybe_unused]] float ga = extent.param[POLY_A].start;
|
||||
[[maybe_unused]] float dga = extent.param[POLY_A].dpdx;
|
||||
|
||||
uint32_t *const fb = &m_backbuffer->pix(scanline);
|
||||
float *const zb = (float*)&m_zbuffer->pix(scanline);
|
||||
|
@ -880,7 +880,7 @@ bool gunpey_state::decompress_sprite(unsigned char *buf, int ix, int iy, int ow,
|
||||
s.ox = 0;
|
||||
s.oy = 0;
|
||||
|
||||
int temp;
|
||||
[[maybe_unused]] int temp;
|
||||
temp = get_next_bit(&s);
|
||||
temp |= get_next_bit(&s) << 1;
|
||||
temp |= get_next_bit(&s) << 2;
|
||||
|
@ -3097,7 +3097,7 @@ void nemesis_state::bubsys_twinbeeb_init()
|
||||
|
||||
for (int i = 0; i < 0x806; i++)
|
||||
{
|
||||
uint16_t crc = 0;
|
||||
[[maybe_unused]] uint16_t crc = 0;
|
||||
|
||||
int sourcebase = i * 0x80;
|
||||
int destbase = i * 0x90;
|
||||
|
@ -269,7 +269,7 @@ void seibu_cop_bootleg_device::cmd_trigger_w(offs_t offset, uint16_t data)
|
||||
*/
|
||||
case 0x8100:
|
||||
{
|
||||
uint16_t sin_offs; //= m_host_space->read_dword(m_reg[0]+(0x34));
|
||||
[[maybe_unused]] uint16_t sin_offs; //= m_host_space->read_dword(m_reg[0]+(0x34));
|
||||
sin_offs = m_host_space->read_byte(m_reg[0]+(0x35));
|
||||
sin_offs |= m_host_space->read_byte(m_reg[0]+(0x37)) << 8;
|
||||
int raw_angle = (m_host_space->read_word(m_reg[0]+(0x34^2)) & 0xff);
|
||||
|
@ -2433,7 +2433,7 @@ void m2_te_device::destination_blend(uint32_t x, uint32_t y, uint32_t w, const r
|
||||
bool winclipdis = false;
|
||||
|
||||
// Z Status
|
||||
uint32_t zgel = 0;
|
||||
[[maybe_unused]] uint32_t zgel = 0;
|
||||
|
||||
uint32_t zaddr;
|
||||
|
||||
|
@ -1422,7 +1422,7 @@ void towns_state::render_text_char(uint8_t x, uint8_t y, uint8_t ascii, uint16_t
|
||||
temp |= ((colour & 0x0f) << 4);
|
||||
if(data & (1<<(b+1)))
|
||||
temp |= (colour & 0x0f);
|
||||
//m_towns_gfxvram[0x40000+vram_addr+(b/2)] = temp;
|
||||
m_towns_gfxvram[0x40000+vram_addr+(b/2)] = temp;
|
||||
}
|
||||
|
||||
vram_addr += linesize;
|
||||
|
@ -440,7 +440,7 @@ void midtunit_video_device::dma_draw()
|
||||
while (iy < height)
|
||||
{
|
||||
int startskip = m_dma_state.startskip << 8;
|
||||
int endskip = m_dma_state.endskip << 8;
|
||||
[[maybe_unused]] int endskip = m_dma_state.endskip << 8;
|
||||
int width = m_dma_state.width << 8;
|
||||
int sx = m_dma_state.xpos;
|
||||
int ix = 0;
|
||||
@ -922,7 +922,7 @@ void midtunit_video_device::log_bitmap(int command, int bpp, bool Skip)
|
||||
for (int y = 0; y < m_dma_state.height; y++)
|
||||
{
|
||||
int startskip = m_dma_state.startskip;
|
||||
int endskip = m_dma_state.endskip;
|
||||
[[maybe_unused]] int endskip = m_dma_state.endskip;
|
||||
int width = m_dma_state.width;
|
||||
int ix = 0;
|
||||
int tx;
|
||||
|
@ -2420,7 +2420,7 @@ u32 *model2_state::geo_code_upload( geo_state *geo, u32 opcode, u32 *input )
|
||||
|
||||
for( i = 0; i < count; i++ )
|
||||
{
|
||||
u64 code;
|
||||
[[maybe_unused]] u64 code;
|
||||
|
||||
/* read the top part of the opcode */
|
||||
code = *input++;
|
||||
|
Loading…
Reference in New Issue
Block a user