]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
runtime: cast SIGSTKSZ to uintptr
authorIan Lance Taylor <iant@golang.org>
Mon, 8 Mar 2021 23:23:40 +0000 (15:23 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 9 Mar 2021 00:16:50 +0000 (16:16 -0800)
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.

libgo/runtime/proc.c

index 274ce01c0bf1d5b99c0c4641ba2354dcf41dbf22..6f7d2e27996f122ef98795f1668bebc4fec09885 100644 (file)
@@ -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
                }