From: Dmitry V. Levin Date: Wed, 14 Jan 2015 07:17:11 +0000 (+0000) Subject: powerpc: fix potential compilation warning X-Git-Tag: v4.10~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b64d9909818d3ae77e987080b174ed0923775ca;p=strace powerpc: fix potential compilation warning * mem.c [POWERPC] (sys_subpage_prot): Fix "comparison between signed and unsigned" warning reported by some gcc versions. --- diff --git a/mem.c b/mem.c index 55943f13..5e1822fb 100644 --- a/mem.c +++ b/mem.c @@ -517,7 +517,7 @@ sys_subpage_prot(struct tcb *tcp) } cur = tcp->u_arg[2]; end = cur + (sizeof(int) * entries); - if (!verbose(tcp) || end < tcp->u_arg[2]) { + if (!verbose(tcp) || end < (unsigned long) tcp->u_arg[2]) { tprintf("%#lx", tcp->u_arg[2]); return 0; } @@ -530,7 +530,7 @@ sys_subpage_prot(struct tcb *tcp) abbrev_end = end; tprints("{"); for (; cur < end; cur += sizeof(int)) { - if (cur > tcp->u_arg[2]) + if (cur > (unsigned long) tcp->u_arg[2]) tprints(", "); if (cur >= abbrev_end) { tprints("...");