From 3ce967264892e9d024c4c34c72b7ce736bbe9faf Mon Sep 17 00:00:00 2001
From: Thomas Moulard <thomas.moulard@gmail.com>
Date: Mon, 15 Oct 2012 19:46:33 +0200
Subject: [PATCH] Fix portability issues with Ubuntu 12.04 (64 bits).

---
 src/traces/tracer-real-time.cpp | 4 ++--
 src/traces/tracer.cpp           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/traces/tracer-real-time.cpp b/src/traces/tracer-real-time.cpp
index dbc3dee..3074b49 100644
--- a/src/traces/tracer-real-time.cpp
+++ b/src/traces/tracer-real-time.cpp
@@ -347,8 +347,8 @@ display( std::ostream& os ) const
 	  else if( (SIZE>>20)||(MSIZE>>20) ) { dec = 20; unit="Mo"; }
 	  else if( (SIZE>>10)||(MSIZE>>10) ) { dec = 10; unit="Ko"; }
  	  os << "[" << std::setw(1)<<std::setprecision(1)
- 	     << ((SIZE+0.0)/(1<<dec)) << unit << "/"
- 	     << std::setprecision(2)<<((MSIZE+0.0)/(1<<dec))
+ 	     << (((double)SIZE+0.0)/(1<<dec)) << unit << "/"
+ 	     << std::setprecision(2)<<(((double)MSIZE+0.0)/(1<<dec))
  	     << unit << "]\t";
 	  if( file->full ) os << "(FULL)";
 	  os.precision(PRECISION);
diff --git a/src/traces/tracer.cpp b/src/traces/tracer.cpp
index ec52a3a..36e0e52 100644
--- a/src/traces/tracer.cpp
+++ b/src/traces/tracer.cpp
@@ -158,7 +158,7 @@ openFiles( const std::string& rootdir_, const std::string& basename_,
 	   const std::string& suffix_  )
 {
   dgDEBUGIN(15);
-  unsigned int n = rootdir_.length ();
+  std::basic_string<char>::size_type n = rootdir_.length ();
   rootdir = rootdir_;
   if( (0<n)&('/'!=rootdir[n-1]) ) rootdir+='/';
 
-- 
GitLab