From fda09816cde44d5dc549a734b0c2559761f68948 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Thu, 8 Apr 2021 10:50:01 -0600 Subject: [PATCH] Eliminate nvcc (NVidia compiler) warning The NVidia nvcc compiler gives a "pdqsort.h(170): warning #68-D: integer conversion resulted in a change of sign" warning. It may be storing the enum as an unsigned value? --- pdqsort.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdqsort.h b/pdqsort.h index 36360cd..98ae833 100644 --- a/pdqsort.h +++ b/pdqsort.h @@ -167,7 +167,8 @@ namespace pdqsort_detail { #else std::size_t ip = reinterpret_cast(p); #endif - ip = (ip + cacheline_size - 1) & -cacheline_size; + int icacheline_size = static_cast(cacheline_size); + ip = (ip + icacheline_size - 1) & -icacheline_size; return reinterpret_cast(ip); }