Fix compilation of some tests as well as more warnings.
diff --git a/test/array.cpp b/test/array.cpp
index aea8d20..71bd126 100644
--- a/test/array.cpp
+++ b/test/array.cpp
@@ -87,8 +87,8 @@
   Index rows = m.rows();
   Index cols = m.cols();
 
-  int r = ei_random<int>(0, rows-1),
-      c = ei_random<int>(0, cols-1);
+  Index r = ei_random<Index>(0, rows-1),
+        c = ei_random<Index>(0, cols-1);
 
   ArrayType m1 = ArrayType::Random(rows, cols),
              m2 = ArrayType::Random(rows, cols),