signal.c: fix musl libc compilation warning

musl libc defines SIGRTMAX to a function that returns signed int,
which obviously makes gcc -Wsign-compare unhappy.

* signal.c (signame): Cast ASM_SIGRTMAX to unsigned int.
This commit is contained in:
Дмитрий Левин 2016-01-12 00:04:15 +00:00
parent 7bbf8b54cd
commit 07572c68dd

View File

@ -124,7 +124,7 @@ signame(const int sig)
if (s < nsignals)
return signalent[s];
#ifdef ASM_SIGRTMAX
if (s >= ASM_SIGRTMIN && s <= ASM_SIGRTMAX) {
if (s >= ASM_SIGRTMIN && s <= (unsigned int) ASM_SIGRTMAX) {
sprintf(buf, "SIGRT_%u", s - ASM_SIGRTMIN);
return buf;
}