From 5e17e16b7f0df3b17237a3abf023467a0e39177d Mon Sep 17 00:00:00 2001 From: James J Balamuta Date: Mon, 17 Jul 2023 17:19:43 -0700 Subject: [PATCH] Fix warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] --- inst/include/pg_sampler_meat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/include/pg_sampler_meat.h b/inst/include/pg_sampler_meat.h index ba7f045..40e5756 100644 --- a/inst/include/pg_sampler_meat.h +++ b/inst/include/pg_sampler_meat.h @@ -35,7 +35,7 @@ inline T rpg_gamma(const T& shape_, const T& scale_, int trunc) { // Initialize a similar result object T result(n); - for(int i=0; i < n; ++i){ + for(unsigned int i = 0; i < n; ++i){ #ifdef USE_R if (i % 1000 == 0) R_CheckUserInterrupt();