powerpc: fix potential compilation warning
* mem.c [POWERPC] (sys_subpage_prot): Fix "comparison between signed and unsigned" warning reported by some gcc versions.
This commit is contained in:
parent
e5b672946e
commit
3b64d99098
4
mem.c
4
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("...");
|
||||
|
Loading…
x
Reference in New Issue
Block a user