diff options
author | Carl Hetherington <carl@carlh.net> | 2011-07-02 17:16:46 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-07-02 17:16:46 +0000 |
commit | cd17e05e3a22614387050736c89a4727c4da0d61 (patch) | |
tree | f224ba7c78d83a9abc5d1c8ecf7bedb31005ed74 /libs | |
parent | c03ea1fdb307fadff2b3c3f837426f1039bf5b10 (diff) |
Fix some set-but-not-used variable warnings from gcc 4.6
git-svn-id: svn://localhost/ardour2/branches/3.0@9783 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/types.h | 4 | ||||
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 5 | ||||
-rw-r--r-- | libs/ardour/audio_playlist.cc | 10 | ||||
-rw-r--r-- | libs/ardour/audio_playlist_source.cc | 1 | ||||
-rw-r--r-- | libs/ardour/midi_diskstream.cc | 3 | ||||
-rw-r--r-- | libs/ardour/midi_track.cc | 3 | ||||
-rw-r--r-- | libs/ardour/playlist.cc | 2 | ||||
-rw-r--r-- | libs/ardour/plugin_manager.cc | 3 | ||||
-rw-r--r-- | libs/ardour/route.cc | 10 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 7 | ||||
-rw-r--r-- | libs/ardour/sndfilesource.cc | 3 | ||||
-rw-r--r-- | libs/ardour/transient_detector.cc | 2 | ||||
-rw-r--r-- | libs/pbd/pool.cc | 3 |
13 files changed, 8 insertions, 48 deletions
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 42264cf1cb..e21c588c62 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -267,6 +267,10 @@ namespace ARDOUR { case Seconds: return seconds != 0; } + + /* NOTREACHED */ + assert (false); + return false; } }; diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 22be5a3912..1132b2a050 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1252,7 +1252,6 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush) if (destructive()) { (*chan)->capture_transition_buf->get_read_vector(&transvec); size_t transcount = transvec.len[0] + transvec.len[1]; - bool have_start = false; size_t ti; for (ti=0; ti < transcount; ++ti) { @@ -1264,9 +1263,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush) (*chan)->write_source->mark_capture_start (captrans.capture_val); (*chan)->curr_capture_cnt = 0; - have_start = true; - } - else if (captrans.type == CaptureEnd) { + } else if (captrans.type == CaptureEnd) { // capture end, the capture_val represents total frames in capture diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 0c9fd4f314..70cd9ec3f5 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -190,9 +190,6 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram framecnt_t fade_in = 64; framecnt_t fade_out = 64; - framepos_t position; - framecnt_t len; - frameoffset_t offset; switch (region->coverage (start, end)) { case OverlapNone: @@ -212,9 +209,6 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram } case OverlapStart: { - position = region->position() - start; - len = end - region->position(); - if (end > region->position() + region->fade_in()->back()->when) fade_in = region->fade_in()->back()->when; //end is after fade-in, preserve the fade-in if (end > region->last_frame() - region->fade_out()->back()->when) @@ -223,10 +217,6 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram } case OverlapEnd: { - position = 0; - offset = start - region->position(); - len = region->length() - offset; - if (start < region->last_frame() - region->fade_out()->back()->when) //start is before fade-out, preserve the fadeout fade_out = region->fade_out()->back()->when; diff --git a/libs/ardour/audio_playlist_source.cc b/libs/ardour/audio_playlist_source.cc index 773deb93ab..79c0c12691 100644 --- a/libs/ardour/audio_playlist_source.cc +++ b/libs/ardour/audio_playlist_source.cc @@ -136,7 +136,6 @@ AudioPlaylistSource::read_unlocked (Sample* dst, framepos_t start, framecnt_t cn boost::shared_ptr<gain_t> gbuf; framecnt_t to_read; framecnt_t to_zero; - pair<framepos_t,framepos_t> extent = _playlist->get_extent(); /* we must be careful not to read beyond the end of our "section" of * the playlist, because otherwise we may read data that exists, but diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index e3eef62107..f6cab420ed 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -905,7 +905,6 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen MidiRegion::SourceList srcs; MidiRegion::SourceList::iterator src; vector<CaptureInfo*>::iterator ci; - bool mark_write_completed = false; finish_capture (true); @@ -1075,8 +1074,6 @@ MidiDiskstream::transport_stopped_wallclock (struct tm& /*when*/, time_t /*twhen } } - - mark_write_completed = true; } use_new_write_source (0); diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 7d7b51aa7f..1df9950f86 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -714,8 +714,6 @@ MidiTrack::set_input_active (bool yn) void MidiTrack::map_input_active (bool yn) { - bool changed = false; - if (!_input) { return; } @@ -726,7 +724,6 @@ MidiTrack::map_input_active (bool yn) MidiPort* mp = dynamic_cast<MidiPort*> (&*p); if (yn != mp->input_active()) { mp->set_input_active (yn); - changed = true; } } } diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 66a0eab9ad..6fad2084e4 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -848,7 +848,6 @@ Playlist::flush_notifications (bool from_undo) { RegionList::iterator i; framecnt_t old_length = 0; - int ret = -1; if (!holding_state()) { old_length = _get_extent().second; @@ -881,7 +880,6 @@ Playlist::flush_notifications (bool from_undo) } notify_region_removed (region); - ret = 0; break; } } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 8221f7b46e..912fc20dcd 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -733,8 +733,7 @@ PluginManager::set_status (PluginType t, string id, PluginStatusType status) return; } - pair<PluginStatusList::iterator, bool> res = statuses.insert (ps); - //cerr << "Added " << t << " " << id << " " << status << " success ? " << res.second << endl; + statuses.insert (ps); } ARDOUR::PluginInfoList& diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 9de9e6cf5c..81d85a8640 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -860,8 +860,6 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite DEBUG_TRACE (DEBUG::Processors, string_compose ( "%1 adding processor %2\n", name(), processor->name())); - ChanCount old_pms = processor_max_streams; - if (!_session.engine().connected() || !processor) { return 1; } @@ -1018,8 +1016,6 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> loc = _processors.end (); } - ChanCount old_pms = processor_max_streams; - if (!_session.engine().connected()) { return 1; } @@ -1044,7 +1040,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> pi->set_count (1); } - ProcessorList::iterator inserted = _processors.insert (loc, *i); + _processors.insert (loc, *i); if ((*i)->active()) { (*i)->activate (); @@ -1216,8 +1212,6 @@ Route::ab_plugins (bool forward) void Route::clear_processors (Placement p) { - const ChanCount old_pms = processor_max_streams; - if (!_session.engine().connected()) { return; } @@ -1298,8 +1292,6 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream return 0; } - ChanCount old_pms = processor_max_streams; - if (!_session.engine().connected()) { return 1; } diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index 8a677105bd..9c37e0a09c 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -182,15 +182,9 @@ int Session::silent_process_routes (pframes_t nframes, bool& need_butler) { bool record_active = actively_recording(); - int declick = get_transport_declick_required(); bool rec_monitors = get_rec_monitors_input(); boost::shared_ptr<RouteList> r = routes.reader (); - if (transport_sub_state & StopPendingCapture) { - /* force a declick out */ - declick = -1; - } - const framepos_t start_frame = _transport_frame; const framepos_t end_frame = _transport_frame + lrintf(nframes * _transport_speed); @@ -705,7 +699,6 @@ Session::track_slave_state (float slave_speed, framepos_t slave_transport_frame, memset (delta_accumulator, 0, sizeof (int32_t) * delta_accumulator_size); average_slave_delta = 0L; - this_delta = 0; } } diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 7006c6c7eb..e5ba83015d 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -405,8 +405,6 @@ SndFileSource::nondestructive_write_unlocked (Sample *data, framecnt_t cnt) framecnt_t SndFileSource::destructive_write_unlocked (Sample* data, framecnt_t cnt) { - framepos_t old_file_pos; - if (!writable()) { warning << string_compose (_("attempt to write a non-writable audio file source (%1)"), _path) << endmsg; return 0; @@ -482,7 +480,6 @@ SndFileSource::destructive_write_unlocked (Sample* data, framecnt_t cnt) } } - old_file_pos = file_pos; update_length (file_pos, cnt); if (_build_peakfiles) { diff --git a/libs/ardour/transient_detector.cc b/libs/ardour/transient_detector.cc index 75e9b4c5e1..cf8557de82 100644 --- a/libs/ardour/transient_detector.cc +++ b/libs/ardour/transient_detector.cc @@ -128,13 +128,11 @@ TransientDetector::update_positions (Readable* src, uint32_t channel, AnalysisFe Plugin::FeatureSet features; Sample* data = 0; - float* bufs[1] = { 0 }; int buff_size = 1024; int step_size = 64; data = new Sample[buff_size]; - bufs[0] = data; AnalysisFeatureList::iterator i = positions.begin(); diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc index 8919f10f9a..9a5e65332b 100644 --- a/libs/pbd/pool.cc +++ b/libs/pbd/pool.cc @@ -178,8 +178,7 @@ PerThreadPool::PerThreadPool () { { /* for some reason this appears necessary to get glib's thread private stuff to work */ - GPrivate* key; - key = g_private_new (NULL); + g_private_new (NULL); } _key = g_private_new (free_per_thread_pool); |