From 0709f38ada52198b9f6d362e6c525fb5cda871d1 Mon Sep 17 00:00:00 2001 From: Kostyantyn Vorobyov <kostyantyn.vorobyov@cea.fr> Date: Tue, 28 Mar 2017 17:50:08 +0200 Subject: [PATCH] Fix undefined behaviour in valid_block.c test case --- src/plugins/e-acsl/tests/runtime/block_valid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/e-acsl/tests/runtime/block_valid.c b/src/plugins/e-acsl/tests/runtime/block_valid.c index 16be7577c10..fcda2fa54e1 100644 --- a/src/plugins/e-acsl/tests/runtime/block_valid.c +++ b/src/plugins/e-acsl/tests/runtime/block_valid.c @@ -45,7 +45,7 @@ int main(int argc, char **argv) { *pmin = 'P'; *pmax = 'L'; - int diff = pmax - pmin; + int diff = (uintptr_t)pmax - (uintptr_t)pmin; /*@assert \valid(pmin); */ /*@assert \valid(pmax); */ /* Access `pmax` through `pmin` */ -- GitLab