From 16369c890e4283f657132f290e9676ed45cec76f Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Mon, 6 May 2024 18:51:07 +0200 Subject: [PATCH] Fix compiler warning src/sys_unix.c:132:10: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32] int r = lrand48(); // this is not thread-safe ~ ^~~~~~~~~ --- src/sys_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sys_unix.c b/src/sys_unix.c index ead0964e..644e39ce 100644 --- a/src/sys_unix.c +++ b/src/sys_unix.c @@ -129,7 +129,7 @@ INTERNAL int SYS_RandomInt(void) // the casts are for the sake of clarity return (int)(ui & (unsigned int)INT_MAX); #else - int r = lrand48(); // this is not thread-safe + int r = (int)lrand48(); // this is not thread-safe return r; #endif /* HAVE_GETRANDOM */ }