diff --git a/src/TNL/Containers/ArrayView.hpp b/src/TNL/Containers/ArrayView.hpp
index cd0a4c537b758401e9e5e0dc6679a822807f4f90..1562508a8bf81a30faf59d566a8f34c302b5d051 100644
--- a/src/TNL/Containers/ArrayView.hpp
+++ b/src/TNL/Containers/ArrayView.hpp
@@ -49,7 +49,7 @@ void
 ArrayView< Value, Device, Index >::
 bind( ValueType* data, IndexType size )
 {
-   TNL_ASSERT_GE( size, 0, "ArrayView size was initialized with a negative size." );
+   TNL_ASSERT_GE( size, ( IndexType ) 0, "ArrayView size was initialized with a negative size." );
    TNL_ASSERT_TRUE( (data == nullptr && size == 0) || (data != nullptr && size > 0),
                     "ArrayView was initialized with a positive address and zero size or zero address and positive size." );
 
diff --git a/src/TNL/Containers/detail/ArrayAssignment.h b/src/TNL/Containers/detail/ArrayAssignment.h
index c6ac6cb1c354ee7c0950b55c632cc30ab4819b86..ee1487c769d854b9ce0e0b24245fc4c389c27b77 100644
--- a/src/TNL/Containers/detail/ArrayAssignment.h
+++ b/src/TNL/Containers/detail/ArrayAssignment.h
@@ -38,7 +38,7 @@ struct ArrayAssignment< Array, T, true >
 
    static void assign( Array& a, const T& t )
    {
-      TNL_ASSERT_EQ( a.getSize(), t.getSize(), "The sizes of the arrays must be equal." );
+      TNL_ASSERT_EQ( a.getSize(), ( decltype( a.getSize() ) ) t.getSize(), "The sizes of the arrays must be equal." );
       // skip assignment of empty arrays
       if( a.getSize() == 0 )
          return;