Fixing missin warnings
This commit is contained in:
parent
66e6632eea
commit
f58b48ec6a
|
@ -41,7 +41,7 @@ quickerNESCoreSrc = [
|
|||
# quickerNES Core Configuration
|
||||
|
||||
quickerNESCoreDependency = declare_dependency(
|
||||
compile_args : [ '-Wfatal-errors', '-Wall', '-Wno-multichar' ],
|
||||
compile_args : [ '-Wfatal-errors', '-Wall', '-Werror', '-Wno-multichar' ],
|
||||
include_directories : include_directories(['source', 'source/core', 'extern']),
|
||||
sources : [ quickerNESCoreSrc, 'extern/metrohash128/metrohash128.cpp' ]
|
||||
)
|
||||
|
|
|
@ -20,14 +20,16 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
|
|||
|
||||
// Data_Reader
|
||||
|
||||
const char * Data_Reader::read( void* p, int n )
|
||||
const char * Data_Reader::read( void* p, int n_ )
|
||||
{
|
||||
if ( n < 0 )
|
||||
if ( n_ < 0 )
|
||||
return "Internal usage bug";
|
||||
|
||||
if ( n <= 0 )
|
||||
if ( n_ == 0 )
|
||||
return 0;
|
||||
|
||||
|
||||
size_t n = n_;
|
||||
|
||||
if ( n > remain() )
|
||||
return "Truncated file";
|
||||
|
||||
|
@ -79,13 +81,14 @@ const char * Data_Reader::skip_v( int count )
|
|||
return 0;
|
||||
}
|
||||
|
||||
const char * Data_Reader::skip( int n )
|
||||
const char * Data_Reader::skip( int n_ )
|
||||
{
|
||||
if ( n < 0 )
|
||||
if ( n_ < 0 )
|
||||
return "Internal usage bug";
|
||||
|
||||
if ( n <= 0 )
|
||||
return 0;
|
||||
if ( n_ == 0 ) return 0;
|
||||
|
||||
size_t n = n_;
|
||||
|
||||
if ( n > remain() )
|
||||
return "Truncated file";
|
||||
|
|
|
@ -162,7 +162,7 @@ Nes_Nonlinearizer::Nes_Nonlinearizer()
|
|||
|
||||
float const gain = 0x7fff * 1.3f;
|
||||
// don't use entire range, so any overflow will stay within table
|
||||
int const range = (int) (table_size * Nes_Apu::nonlinear_tnd_gain());
|
||||
int const range = (int) ( (double)table_size * Nes_Apu::nonlinear_tnd_gain());
|
||||
for ( int i = 0; i < table_size; i++ )
|
||||
{
|
||||
int const offset = table_size - range;
|
||||
|
|
|
@ -207,10 +207,6 @@ void Nes_Core::enable_sram( bool b, bool read_only )
|
|||
|
||||
// Unmapped memory
|
||||
|
||||
#ifndef NDEBUG
|
||||
static nes_addr_t last_unmapped_addr;
|
||||
#endif
|
||||
|
||||
void Nes_Core::log_unmapped( nes_addr_t addr, int data )
|
||||
{
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ void Nes_Fme7_Apu::reset()
|
|||
|
||||
unsigned char Nes_Fme7_Apu::amp_table [16] =
|
||||
{
|
||||
#define ENTRY( n ) (unsigned char) (n * amp_range + 0.5)
|
||||
#define ENTRY( n ) (unsigned char) (n * +amp_range + 0.5)
|
||||
ENTRY(0.0000), ENTRY(0.0078), ENTRY(0.0110), ENTRY(0.0156),
|
||||
ENTRY(0.0221), ENTRY(0.0312), ENTRY(0.0441), ENTRY(0.0624),
|
||||
ENTRY(0.0883), ENTRY(0.1249), ENTRY(0.1766), ENTRY(0.2498),
|
||||
|
|
|
@ -68,7 +68,7 @@ private:
|
|||
|
||||
inline void Nes_Fme7_Apu::volume( double v )
|
||||
{
|
||||
synth.volume( 0.38 / amp_range * v ); // to do: fine-tune
|
||||
synth.volume( 0.38 / +amp_range * v ); // to do: fine-tune
|
||||
}
|
||||
|
||||
inline void Nes_Fme7_Apu::treble_eq( blip_eq_t const& eq )
|
||||
|
|
|
@ -82,7 +82,7 @@ inline uint8_t& Nes_Namco_Apu::access()
|
|||
return reg [addr];
|
||||
}
|
||||
|
||||
inline void Nes_Namco_Apu::volume( double v ) { synth.volume( 0.10 / osc_count * v ); }
|
||||
inline void Nes_Namco_Apu::volume( double v ) { synth.volume( 0.10 / +osc_count * v ); }
|
||||
|
||||
inline void Nes_Namco_Apu::treble_eq( const blip_eq_t& eq ) { synth.treble_eq( eq ); }
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ typedef unsigned long nes_ntsc_rgb_t;
|
|||
struct nes_ntsc_t {
|
||||
nes_ntsc_rgb_t table [nes_ntsc_palette_size] [nes_ntsc_entry_size];
|
||||
};
|
||||
enum { nes_ntsc_burst_size = nes_ntsc_entry_size / nes_ntsc_burst_count };
|
||||
enum { nes_ntsc_burst_size = +nes_ntsc_entry_size / +nes_ntsc_burst_count };
|
||||
|
||||
#define NES_NTSC_ENTRY_( ktable, n ) \
|
||||
(nes_ntsc_rgb_t const*) (ktable + (n) * (nes_ntsc_entry_size * sizeof (nes_ntsc_rgb_t)))
|
||||
|
|
Loading…
Reference in New Issue