Clear up a load of compiler warnings.

This commit is contained in:
Jonathan Moore Liles 2008-05-18 22:01:09 -05:00
parent 9ef454291a
commit 47dbf6c537
17 changed files with 45 additions and 79 deletions

View File

@ -36,7 +36,7 @@ Fl_Single_Window *main_window;
#include <FL/Boxtypes.H>
int
main ( int argc, char **arv )
main ( int argc, char **argv )
{
Fl::get_system_colors();
Fl::scheme( "plastic" );
@ -61,7 +61,7 @@ main ( int argc, char **arv )
o->end();
}
o->end();
o->show();
o->show( argc, argv );
while ( 1 )
{

View File

@ -77,9 +77,9 @@ public:
log_create();
}
Annotation_Sequence ( int X, int Y, int W, int H ) : Sequence ( 0 )
{
}
/* Annotation_Sequence ( int X, int Y, int W, int H ) : Sequence ( 0 ) */
/* { */
/* } */
~Annotation_Sequence ( )
{

View File

@ -165,7 +165,7 @@ void
Disk_Stream::run ( void )
{
if ( pthread_create( &_thread, NULL, &Disk_Stream::disk_thread, this ) != 0 )
/* error */;
FATAL( "Could not create IO thread!" );
}
/* to be called when the JACK buffer size changes. */

View File

@ -150,7 +150,7 @@ Engine::sync ( jack_transport_state_t state, jack_position_t *pos )
/* THREAD: RT */
void
Engine::timebase ( jack_transport_state_t state, jack_nframes_t nframes, jack_position_t *pos, int new_pos )
Engine::timebase ( jack_transport_state_t, jack_nframes_t, jack_position_t *pos, int )
{
position_info pi = timeline->solve_tempomap( pos->frame );

View File

@ -234,7 +234,7 @@ protected:
void log_destroy ( void ) const;
/* leaf subclasses *must* call log_create() at the end of their copy contructors */
Loggable ( const Loggable &rhs )
Loggable ( const Loggable & )
{
init( true );
/* FIXME: get a real id here!!! */

View File

@ -84,29 +84,6 @@ touch ( int fd )
fchmod( fd, st.st_mode );
}
static int
nearest_power_of_two ( int v )
{
int p = 1;
while ( 1 << p < v )
++p;
return 1 << p;
}
static nframes_t
nearest_cached_chunksize ( nframes_t chunksize )
{
nframes_t r = nearest_power_of_two( chunksize );
for ( int i = Peaks::cache_levels; i--; r >>= Peaks::cache_step )
if ( chunksize >= r )
return r;
return 0;
}
Peaks::Peaks ( Audio_File *c )
@ -128,7 +105,7 @@ Peaks::fill_buffer ( float fpp, nframes_t s, nframes_t e ) const
{
_fpp = fpp;
return read_peaks( s, e, (e - s) / fpp, fpp );
return read_peaks( s, (e - s) / fpp, fpp );
}
struct peakfile_block_header
@ -297,6 +274,8 @@ public:
scan( chunksize );
assert( _chunksize );
return true;
}
void
@ -337,7 +316,8 @@ public:
nframes_t len = 0;
nframes_t i;
int i;
for ( i = 0; i < npeaks; ++i )
{
/* read in a buffer */
@ -389,9 +369,6 @@ Peaks::ready ( nframes_t s, int npeaks, nframes_t chunksize ) const
int
Peaks::read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chunksize ) const
{
nframes_t ncc = nearest_cached_chunksize( chunksize );
/* never try to build peaks while recording */
if ( ! transport->recording )
{
@ -408,19 +385,7 @@ Peaks::read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chu
if ( ! _peakfile.open( _clip->name(), _clip->channels(), chunksize ) )
return 0;
/* else if ( ! _peakfile.contains( s, npeaks ) ) */
/* { */
/* /\* the best peakfile for this chunksize doesn't have the */
/* * peaks we need. Perhaps it's still being constructed, */
/* * try the next best, then give up. *\/ */
/* if ( ! _peakfile.open( _clip->name(), chunksize >> 1, _clip->channels() ) ) */
/* return 0; */
/* } */
return _peakfile.read_peaks( peaks, s, npeaks, chunksize );
// _peakfile.close();
}
@ -479,7 +444,7 @@ Peaks::read_source_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chunk
}
int
Peaks::read_peaks ( nframes_t s, nframes_t e, int npeaks, nframes_t chunksize ) const
Peaks::read_peaks ( nframes_t s, int npeaks, nframes_t chunksize ) const
{
// printf( "reading peaks %d @ %d\n", npeaks, chunksize );
@ -494,7 +459,7 @@ Peaks::read_peaks ( nframes_t s, nframes_t e, int npeaks, nframes_t chunksize )
_peakbuf.buf->chunksize = chunksize;
/* FIXME: use actual minimum chunksize from peakfile! */
if ( chunksize < cache_minimum )
if ( chunksize < (nframes_t)cache_minimum )
_peakbuf.len = read_source_peaks( _peakbuf.buf->data, s, npeaks, chunksize );
else
_peakbuf.len = read_peakfile_peaks( _peakbuf.buf->data, s, npeaks, chunksize );

View File

@ -101,7 +101,7 @@ class Peaks
mutable float _fpp;
int read_peaks ( nframes_t s, nframes_t e, int npeaks, nframes_t chunksize ) const;
int read_peaks ( nframes_t s, int npeaks, nframes_t chunksize ) const;
int read_source_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chunksize ) const;
int read_source_peaks ( Peak *peaks, int npeaks, nframes_t chunksize ) const;
int read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chunksize ) const;

View File

@ -82,7 +82,7 @@ Playback_DS::read_block ( sample_t *buf, nframes_t nframes )
if ( sequence()->play( buf, _frame, nframes, channels() ) )
_frame += nframes;
else
/* error */;
WARNING( "Programming error?" );
timeline->unlock();
}

View File

@ -223,7 +223,7 @@ void
Sequence::snap ( Sequence_Widget *r )
{
const int snap_pixels = 10;
const int snap_frames = timeline->x_to_ts( snap_pixels );
const nframes_t snap_frames = timeline->x_to_ts( snap_pixels );
/* snap to other widgets */
if ( Timeline::snap_magnetic )

View File

@ -118,6 +118,6 @@ public:
virtual int handle ( int m );
virtual void draw ( void );
virtual nframes_t process ( nframes_t nframes ) { return 0; }
virtual nframes_t process ( nframes_t ) { return 0; }
};

View File

@ -106,7 +106,7 @@ Sequence_Widget::start ( nframes_t where )
d = 0 - d;
if ( m <= d )
if ( m <= (nframes_t)d )
d = m;
for ( list <Sequence_Widget *>::iterator i = _selection.begin(); i != _selection.end(); ++i )

View File

@ -156,7 +156,7 @@ public:
}
static void
enter_cb ( Fl_Widget *w, void *v )
enter_cb ( Fl_Widget *, void *v )
{
((Tempo_Point_Editor*)v)->enter_cb();
}

View File

@ -28,8 +28,8 @@ class Tempo_Sequence : public Sequence
protected:
/* not used */
void get ( Log_Entry &e ) const { }
void set ( Log_Entry &e ) { }
void get ( Log_Entry & ) const { }
void set ( Log_Entry & ) { }
public:

View File

@ -185,7 +185,7 @@ public:
}
static void
enter_cb ( Fl_Widget *w, void *v )
enter_cb ( Fl_Widget *, void *v )
{
((Time_Point_Editor*)v)->enter_cb();
}

View File

@ -31,8 +31,8 @@ class Time_Sequence : public Sequence
protected:
/* not used */
void get ( Log_Entry &e ) const { }
void set ( Log_Entry &e ) { }
void get ( Log_Entry & ) const { }
void set ( Log_Entry & ) { }
public:

View File

@ -233,21 +233,22 @@ Timeline::Timeline ( int X, int Y, int W, int H, const char* L ) : Fl_Overlay_Wi
}
float
Timeline::beats_per_minute ( nframes_t when ) const
{
/* return tempo_track->beats_per_minute( when ); */
/* float */
/* Timeline::beats_per_minute ( nframes_t when ) const */
/* { */
}
/* /\* return tempo_track->beats_per_minute( when ); *\/ */
int
Timeline::beats_per_bar ( nframes_t when ) const
{
time_sig t = time_track->time( when );
/* } */
return t.beats_per_bar;
}
/* int */
/* Timeline::beats_per_bar ( nframes_t when ) const */
/* { */
/* time_sig t = time_track->time( when ); */
/* return t.beats_per_bar; */
/* } */
void
Timeline::beats_per_minute ( nframes_t when, float bpm )
@ -502,12 +503,12 @@ Timeline::draw_measure_lines ( int X, int Y, int W, int H, Fl_Color color )
}
/** just like draw mesure lines except that it also draws the BBT values. */
void
Timeline::draw_measure_BBT ( int X, int Y, int W, int H, Fl_Color color )
{
// render_tempomap( X, Y, W, H, color, true );
}
/* /\** just like draw mesure lines except that it also draws the BBT values. *\/ */
/* void */
/* Timeline::draw_measure_BBT ( int X, int Y, int W, int H, Fl_Color color ) */
/* { */
/* // render_tempomap( X, Y, W, H, color, true ); */
/* } */
void
Timeline::xposition ( int X )

View File

@ -41,7 +41,7 @@ int Track::_soloing = 0;
const char *Track::capture_format = "Wav 24";
void
Track::cb_input_field ( Fl_Widget *w, void *v )
Track::cb_input_field ( Fl_Widget *, void *v )
{
((Track*)v)->cb_input_field();
}