diff --git a/include/FileSystem.h b/include/FileSystem.h index c5693bd4..4b167350 100644 --- a/include/FileSystem.h +++ b/include/FileSystem.h @@ -102,7 +102,6 @@ protected: Glib::ustring output, error ; Sector T, N, S ; //File system [T]otal num of blocks, [N]um of free (or used) blocks, block [S]ize int exit_status ; - unsigned int index ; private: int execute_command_internal( const Glib::ustring & command, OperationDetail & operationdetail, diff --git a/src/ext2.cc b/src/ext2.cc index bcd05309..e3736d01 100644 --- a/src/ext2.cc +++ b/src/ext2.cc @@ -128,7 +128,7 @@ void ext2::set_used_sectors( Partition & partition ) // unmounted. if ( ! Utils::execute_command( dump_cmd + " -h " + partition .get_path(), output, error, true ) ) { - index = output .find( "Block count:" ) ; + Glib::ustring::size_type index = output.find( "Block count:" ); if ( index >= output .length() || sscanf( output.substr( index ) .c_str(), "Block count: %Ld", &T ) != 1 ) T = -1 ; diff --git a/src/fat16.cc b/src/fat16.cc index e85042ff..fe388987 100644 --- a/src/fat16.cc +++ b/src/fat16.cc @@ -136,7 +136,7 @@ void fat16::set_used_sectors( Partition & partition ) if ( exit_status == 0 || exit_status == 1 ) { //total file system size in logical sectors - index = output .rfind( "\n", output .find( "sectors total" ) ) +1 ; + Glib::ustring::size_type index = output.rfind( "\n", output.find( "sectors total" ) ) + 1; if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &T ) != 1 ) T = -1 ; diff --git a/src/jfs.cc b/src/jfs.cc index 866bce0f..210406be 100644 --- a/src/jfs.cc +++ b/src/jfs.cc @@ -79,7 +79,7 @@ void jfs::set_used_sectors( Partition & partition ) if ( ! Utils::execute_command( "sh -c 'echo dm | jfs_debugfs " + partition.get_path() + "'", output, error, true ) ) { //blocksize - index = output .find( "Block Size:" ) ; + Glib::ustring::size_type index = output.find( "Block Size:" ); if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "Block Size: %Ld", &S ) != 1 ) S = -1 ; diff --git a/src/ntfs.cc b/src/ntfs.cc index 50716be7..90031cb7 100644 --- a/src/ntfs.cc +++ b/src/ntfs.cc @@ -127,7 +127,7 @@ void ntfs::set_used_sectors( Partition & partition ) "ntfsresize --info --force --no-progress-bar " + partition .get_path(), output, error, true ) ; if ( exit_status == 0 || exit_status == 1 ) { - index = output .find( "Current volume size:" ) ; + Glib::ustring::size_type index = output.find( "Current volume size:" ); if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "Current volume size: %Ld", &T ) != 1 ) T = -1 ; diff --git a/src/reiser4.cc b/src/reiser4.cc index 92d49115..b588cc44 100644 --- a/src/reiser4.cc +++ b/src/reiser4.cc @@ -64,7 +64,7 @@ void reiser4::set_used_sectors( Partition & partition ) { if ( ! Utils::execute_command( "debugfs.reiser4 " + partition .get_path(), output, error, true ) ) { - index = output .find( "\nblocks:" ) ; + Glib::ustring::size_type index = output.find( "\nblocks:" ); if ( index >= output .length() || sscanf( output.substr( index ) .c_str(), "\nblocks: %Ld", &T ) != 1 ) T = -1 ; diff --git a/src/reiserfs.cc b/src/reiserfs.cc index 710f3f95..ca493cfc 100644 --- a/src/reiserfs.cc +++ b/src/reiserfs.cc @@ -81,7 +81,7 @@ void reiserfs::set_used_sectors( Partition & partition ) { if ( ! Utils::execute_command( "debugreiserfs " + partition .get_path(), output, error, true ) ) { - index = output .find( "Count of blocks on the device:" ) ; + Glib::ustring::size_type index = output.find( "Count of blocks on the device:" ); if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "Count of blocks on the device: %Ld", &T ) != 1 ) T = -1 ; diff --git a/src/xfs.cc b/src/xfs.cc index 1cc36a6d..d43cf89a 100644 --- a/src/xfs.cc +++ b/src/xfs.cc @@ -99,7 +99,7 @@ void xfs::set_used_sectors( Partition & partition ) S = -1 ; //filesystem blocks - index = output .find( "\ndblocks" ) ; + Glib::ustring::size_type index = output.find( "\ndblocks" ); if ( index > output .length() || sscanf( output .substr( index ) .c_str(), "\ndblocks = %Ld", &T ) != 1 ) T = -1 ;