summaryrefslogtreecommitdiff
path: root/libs/ardour/audiosource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-11-21 17:03:06 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-11-21 17:03:06 +0000
commiteba4f18a92f478df4a92ca46bac8ba44afc5ddca (patch)
tree8d655e139f5a4b37234c3dc065a1d0aa9c0e3bee /libs/ardour/audiosource.cc
parent22f6b991300e265ecfe0e8fb9e52f36a0cd2912a (diff)
fix a few warnings from newer versions of gcc
git-svn-id: svn://localhost/ardour2/branches/3.0@10734 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audiosource.cc')
-rw-r--r--libs/ardour/audiosource.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index e9e7228421..3a84af58b5 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -881,8 +881,9 @@ AudioSource::compute_and_write_peaks (Sample* buf, framecnt_t first_frame, frame
off_t target_length = blocksize * ((first_peak_byte + blocksize + 1) / blocksize);
if (endpos < target_length) {
- (void) ftruncate (_peakfile_fd, target_length);
- /* error doesn't actually matter though, so continue on without testing */
+ if (ftruncate (_peakfile_fd, target_length)) {
+ /* error doesn't actually matter so continue on without testing */
+ }
}
}
@@ -924,7 +925,10 @@ AudioSource::truncate_peakfile ()
off_t end = lseek (_peakfile_fd, 0, SEEK_END);
if (end > _peak_byte_max) {
- (void) ftruncate (_peakfile_fd, _peak_byte_max);
+ if (ftruncate (_peakfile_fd, _peak_byte_max)) {
+ error << string_compose (_("could not truncate peakfile %1 to %2 (error: %3)"),
+ peakpath, _peak_byte_max, errno) << endmsg;
+ }
}
}