summaryrefslogtreecommitdiffstats
path: root/indexlib
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-21 13:17:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-21 13:17:48 -0600
commit292e3c830032a4634f04c3095d6bfa272b65d712 (patch)
tree37d103a34c4aebbbc76243461eb29b73152a916c /indexlib
parentdc69027b0e7092ad69d8e58f1ee3aff22fd4d9c6 (diff)
downloadtdepim-292e3c830032a4634f04c3095d6bfa272b65d712.tar.gz
tdepim-292e3c830032a4634f04c3095d6bfa272b65d712.zip
Fix a number of build warnings
Diffstat (limited to 'indexlib')
-rw-r--r--indexlib/mmap_manager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indexlib/mmap_manager.cpp b/indexlib/mmap_manager.cpp
index 7f6b19292..3a4f14fc8 100644
--- a/indexlib/mmap_manager.cpp
+++ b/indexlib/mmap_manager.cpp
@@ -75,7 +75,11 @@ void mmap_manager::resize( unsigned ns ) {
unsigned old_size = size();
unmap();
ns = ( ns / pagesize_ + bool( ns % pagesize_ ) ) * pagesize_;
- ftruncate( fd_, ns );
+ if (ftruncate( fd_, ns ) < 0) {
+ // An error occurred
+ // FIXME
+ printf("Something went wrong in indexlib/mmap_manager.cpp\n");
+ }
map( ns );
logfile() << format( "Going to bzero from %s to %s)\n" ) % old_size % size();
memset( rw_base( old_size ), 0, size() - old_size );