From fb95aeb47da03f824934b329f78592603ce40d05 Mon Sep 17 00:00:00 2001
From: hrouis <houssemeddine.rouis92@gmail.com>
Date: Thu, 23 May 2024 16:57:00 +0200
Subject: [PATCH] fix Slice warning

---
 src/operator/Slice.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/operator/Slice.cpp b/src/operator/Slice.cpp
index 070ea8c19..7ae8cf872 100644
--- a/src/operator/Slice.cpp
+++ b/src/operator/Slice.cpp
@@ -152,7 +152,7 @@ bool Aidge::Slice_Op::forwardDims(bool /*allowDataDependency*/) {
             if(step == 0) {
                 AIDGE_THROW_OR_ABORT(std::runtime_error, "{}: Step must be a non-zero value", type());
             }
-            if(step * (end - start) < 0) {
+            if(step * (static_cast<int64_t>(end) - static_cast<int64_t>(start)) < 0) {
                 if(step < 0) {
                     AIDGE_THROW_OR_ABORT(std::runtime_error, "{}: Step is negative we must have End < Start", type());
                 }
-- 
GitLab