diff options
author | David Robillard <d@drobilla.net> | 2008-09-19 18:16:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-09-19 18:16:50 +0000 |
commit | f201dc3e3c06f888f097ed6d378a597e99e244fd (patch) | |
tree | 01502833cdf1e36eb164e2114574871387f0150b /libs/ardour/insert.cc | |
parent | 48a8363080c0b9c79ace0b0b70943ed4ce074d26 (diff) |
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
Diffstat (limited to 'libs/ardour/insert.cc')
-rw-r--r-- | libs/ardour/insert.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/ardour/insert.cc b/libs/ardour/insert.cc index 35b820dad3..0227da8246 100644 --- a/libs/ardour/insert.cc +++ b/libs/ardour/insert.cc @@ -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; } } |