]> granicus.if.org Git - strace/commitdiff
signal.c: fix musl libc compilation warning
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Jan 2016 00:04:15 +0000 (00:04 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Jan 2016 03:07:39 +0000 (03:07 +0000)
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.

signal.c

index ec1684ef82ecd6623982ad584c6076e470555519..45509dce49166150edd8a33ad7ce66412805fc4b 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -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;
                }