From: Ian Lance Taylor Date: Mon, 8 Mar 2021 23:23:40 +0000 (-0800) Subject: runtime: cast SIGSTKSZ to uintptr X-Git-Tag: releases/gcc-10.3.0~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c8e29c81b789db8a49616e0d36d16f869cf442a;p=thirdparty%2Fgcc.git runtime: cast SIGSTKSZ to uintptr PR go/99458 * libgo/runtime/proc.c: cast SIGSTKSZ to uintptr In newer versions of glibc it is long, which causes a signed comparison warning. --- diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 274ce01c0bf1..6f7d2e27996f 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -799,8 +799,8 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re if(signalstack) { stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux >= 2K #ifdef SIGSTKSZ - if(stacksize < SIGSTKSZ) - stacksize = SIGSTKSZ; + if(stacksize < (uintptr)(SIGSTKSZ)) + stacksize = (uintptr)(SIGSTKSZ); #endif }