diff --git a/src/IGBheader.cc b/src/IGBheader.cc
index 63150d49df8d8f94338ee2ff25a0dd2f63f2fb8f..bedba221980e425f96d350797b647fccd538cbde 100644
--- a/src/IGBheader.cc
+++ b/src/IGBheader.cc
@@ -1383,7 +1383,7 @@ int IGBheader::endian()
 
 
 /** set the data pointer to a specific frame */
-bool IGBheader::data_frame( int frame ) {
+bool IGBheader::data_frame( size_t fr ) {
   if( frame >= v_t )
     return false;
 
diff --git a/src/IGBheader.h b/src/IGBheader.h
index 2c03aa51fa13ada8cc095585960b859e1ac4f59a..6cf55562920ce183d3b320e339d3e96584f0c287 100644
--- a/src/IGBheader.h
+++ b/src/IGBheader.h
@@ -353,7 +353,7 @@ class IGBheader
     inline char* transparentstr(void){ return transstr; }
     int  num_components(){ return Num_Components[v_type]; }
     int  endian();
-    bool data_frame( int );
+    bool data_frame( size_t );
     template<class T> int read_data( T* dp, int numt=1, char *buf=NULL );
     template<class T> void write_data( T* dp, int numt=1, char *buf=NULL );
     template<class T> void to_bin( void *buf, T d );
@@ -405,7 +405,7 @@ template<class T>
 int
 IGBheader::read_data( T* dp, int numt, char *buf )
 {
-  int    slicesize = data_size()*slice_sz()*numt;
+  size_t  slicesize = data_size()*slice_sz()*numt;
   bool   alloc_buf = false;
   if ( buf==NULL ) {
     buf = new char[slicesize];