             fprintf(stderr,"  testing SSW scoring speed...\n");
             fprintf(stderr,"    %15s : ", "local");
 
-            const int8 mat[4*4] = {2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2};
-
-            const uint32 n_read_symbols = h_read_data->read_index()[ h_read_data->size() ];
-            std::vector<int8> unpacked_reads( n_read_symbols );
+            const int8_t mat[4*4] = {2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2, -1, -1, -1, -1, 2};
+
+            std::vector<int8_t> unpacked_reads( n_read_symbols );
 
             typedef io::ReadData::const_read_stream_type read_stream_type;
 
             const read_stream_type packed_reads( h_read_data->read_stream() );
 
             #pragma omp parallel for
-            for (int i = 0; i < n_read_symbols; ++i)
+            for (int i = 0; i < int( n_read_symbols ); ++i)
                 unpacked_reads[i] = packed_reads[i];
 
             Timer timer;
             timer.start();
 
             #pragma omp parallel for
-            for (int i = 0; i < h_read_data->size(); ++i)
+            for (int i = 0; i < int( h_read_data->size() ); ++i)
             {
                 const uint32 read_off = h_read_data->read_index()[i];
                 const uint32 read_len = h_read_data->read_index()[i+1] - read_off;

                    d_read_data.read_index(),
                    d_read_data.read_stream(),
                    d_read_data.max_read_len(),
                    nvbio::plain_view( d_ref_storage ),
                    ref_length,
                    nvbio::plain_view( score_dvec ) );

#include <vector>
#include <algorithm>

//#define SSWLIB
#if defined(SSWLIB)
#include "ssw.h"
#include <omp.h>
