ruby-changes:58124
From: Yusuke <ko1@a...>
Date: Sat, 5 Oct 2019 07:39:06 +0900 (JST)
Subject: [ruby-changes:58124] 170d154059 (master): signal.c: Use MINSIGSTKSZ by casting to int
https://git.ruby-lang.org/ruby.git/commit/?id=170d154059 From 170d1540596c72c9197732d051d8d9302b87f033 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Sat, 5 Oct 2019 07:37:19 +0900 Subject: signal.c: Use MINSIGSTKSZ by casting to int MINSIGSTKSZ is unsigned int in OpenBSD, which makes a warning of comparison: ``` signal.c:535:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] if (size < MINSIGSTKSZ) ~~~~ ^ ~~~~~~~~~~~ 1 warning generated. ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191004T200009Z.log.html.gz diff --git a/signal.c b/signal.c index 505cd79..25f9540 100644 --- a/signal.c +++ b/signal.c @@ -532,8 +532,11 @@ rb_sigaltstack_size(void) https://github.com/ruby/ruby/blob/trunk/signal.c#L532 int size = 16*1024; #ifdef MINSIGSTKSZ - if (size < MINSIGSTKSZ) - size = MINSIGSTKSZ; + { + int minsigstksz = (int)MINSIGSTKSZ; + if (size < minsigstksz) + size = minsigstksz; + } #endif #if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/