mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 01:17:42 +01:00
Fix a bunch of stupid warnings.
Q: What's a lot harder than initializing a variable? A: Fixing future non-deterministic bugs that would have been deterministic if you initialized the damn variable :) git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3767 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
48a8363080
commit
f201dc3e3c
7 changed files with 12 additions and 17 deletions
|
|
@ -2278,7 +2278,7 @@ Editor::set_edit_point_preference (EditPoint ep, bool force)
|
|||
break;
|
||||
}
|
||||
|
||||
const char* action;
|
||||
const char* action=NULL;
|
||||
|
||||
switch (_edit_point) {
|
||||
case EditAtPlayhead:
|
||||
|
|
@ -4382,7 +4382,7 @@ Editor::idle_visual_changer ()
|
|||
|
||||
if (p & VisualChange::TimeOrigin) {
|
||||
|
||||
nframes64_t csf, cef;
|
||||
nframes64_t csf=0, cef=0;
|
||||
nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
|
||||
|
||||
if (session) {
|
||||
|
|
|
|||
|
|
@ -2344,7 +2344,7 @@ Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
|
|||
void
|
||||
Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
{
|
||||
nframes64_t f_delta;
|
||||
nframes64_t f_delta = 0;
|
||||
nframes64_t newframe;
|
||||
bool is_start;
|
||||
bool move_both = false;
|
||||
|
|
|
|||
|
|
@ -3257,9 +3257,9 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
|||
return;
|
||||
}
|
||||
|
||||
nframes64_t distance;
|
||||
nframes64_t distance = 0;
|
||||
nframes64_t pos = 0;
|
||||
int dir;
|
||||
int dir = 1;
|
||||
|
||||
list<RegionView*> sorted;
|
||||
rs.by_position (sorted);
|
||||
|
|
@ -3271,7 +3271,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
|||
pos = position;
|
||||
if (position > r->position()) {
|
||||
distance = position - r->position();
|
||||
dir = 1;
|
||||
} else {
|
||||
distance = r->position() - position;
|
||||
dir = -1;
|
||||
|
|
@ -3282,7 +3281,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
|||
if (position > r->last_frame()) {
|
||||
distance = position - r->last_frame();
|
||||
pos = r->position() + distance;
|
||||
dir = 1;
|
||||
} else {
|
||||
distance = r->last_frame() - position;
|
||||
pos = r->position() - distance;
|
||||
|
|
@ -3294,7 +3292,6 @@ Editor::align_selection_relative (RegionPoint point, nframes64_t position, const
|
|||
pos = r->adjust_to_sync (position);
|
||||
if (pos > r->position()) {
|
||||
distance = pos - r->position();
|
||||
dir = 1;
|
||||
} else {
|
||||
distance = r->position() - pos;
|
||||
dir = -1;
|
||||
|
|
@ -4740,7 +4737,7 @@ Editor::toggle_fade_active (bool in)
|
|||
|
||||
const char* cmd = (in ? _("toggle fade in active") : _("toggle fade out active"));
|
||||
bool have_switch = false;
|
||||
bool yn;
|
||||
bool yn = false;
|
||||
|
||||
begin_reversible_command (cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ Crossfade::set_follow_overlap (bool yn)
|
|||
nframes_t
|
||||
Crossfade::set_length (nframes_t len)
|
||||
{
|
||||
nframes_t limit;
|
||||
nframes_t limit = 0;
|
||||
|
||||
switch (_anchor_point) {
|
||||
case StartOfIn:
|
||||
|
|
|
|||
|
|
@ -430,11 +430,9 @@ PluginInsert::automation_run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t
|
|||
}
|
||||
|
||||
nframes_t buffer_correct = 0;
|
||||
int i;
|
||||
|
||||
|
||||
while (nframes) {
|
||||
nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
|
||||
nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
|
||||
|
||||
// This is called first, but nframes = 256
|
||||
connect_and_run (bufs, nbufs, cnt, offset, true, now);
|
||||
|
|
@ -444,7 +442,7 @@ PluginInsert::automation_run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t
|
|||
now += cnt;
|
||||
buffer_correct += cnt;
|
||||
|
||||
for (i = 0; i < nbufs; i++) {
|
||||
for (uint32_t i = 0; i < nbufs; i++) {
|
||||
bufs[i] += cnt;
|
||||
}
|
||||
|
||||
|
|
@ -459,7 +457,7 @@ PluginInsert::automation_run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t
|
|||
connect_and_run (bufs, nbufs, nframes, offset, true, now);
|
||||
}
|
||||
|
||||
for (i = 0; i < nbufs; i++) {
|
||||
for (uint32_t i = 0; i < nbufs; i++) {
|
||||
bufs[i] -= buffer_correct;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ ResampledImportableSource::ResampledImportableSource (boost::shared_ptr<Importab
|
|||
|
||||
/* Initialize the sample rate converter. */
|
||||
|
||||
int src_type;
|
||||
int src_type = SRC_SINC_BEST_QUALITY;
|
||||
|
||||
switch (srcq) {
|
||||
case SrcBest:
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const AudioFileSource::Flag SndFileSource::default_writable_flags = AudioFileSou
|
|||
AudioFileSource::CanRename);
|
||||
|
||||
static void
|
||||
snprintf_bounded_null_filled (char* target, size_t target_size, char* fmt, ...)
|
||||
snprintf_bounded_null_filled (char* target, size_t target_size, const char* fmt, ...)
|
||||
{
|
||||
char buf[target_size+1];
|
||||
va_list ap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue