1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
Yusuke Endoh 2019-10-05 07:37:19 +09:00
parent 417c64b9a8
commit 170d154059

View file

@ -532,8 +532,11 @@ rb_sigaltstack_size(void)
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)
{