From 704fb0cbd9b54639ef83b7c9316f83577742ee7a Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 19 Apr 2018 22:13:53 +0200 Subject: [PATCH] Add a cast to avoid a warning with some compilers (I am not sure the warning was justified). --- m-snapshot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-snapshot.h b/m-snapshot.h index c722bec5..a2abff31 100644 --- a/m-snapshot.h +++ b/m-snapshot.h @@ -295,7 +295,7 @@ typedef struct snapshot_mrsw_int_s { #define SNAPSHOTI_SPMC_INT_CONTRACT(s) do { \ assert (s != NULL); \ assert (s->n > 0 && s->n <= SNAPSHOTI_SPMC_MAX_READER); \ - assert (SNAPSHOTI_SPMC_INT_FLAG_W(atomic_load(&s->lastNext)) \ + assert ((size_t)SNAPSHOTI_SPMC_INT_FLAG_W(atomic_load(&s->lastNext)) \ <= s->n + SNAPSHOTI_SPMC_EXTRA_BUFFER); \ assert (s->cptTab != NULL); \ } while (0)