Commit 342debdcf87d79ee88c63965e6bab478b3ad47eb
1 parent
a87295e8
Suppress pointer from integer of different size warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2862 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
linux-user/syscall_defs.h
... | ... | @@ -182,10 +182,10 @@ __target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cms |
182 | 182 | |
183 | 183 | __cmsg = (struct target_cmsghdr *) ((unsigned char *) __cmsg |
184 | 184 | + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len))); |
185 | - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) tswapl(__mhdr->msg_control) | |
185 | + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) (unsigned long)tswapl(__mhdr->msg_control) | |
186 | 186 | + tswapl(__mhdr->msg_controllen)) |
187 | 187 | || ((unsigned char *) __cmsg + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)) |
188 | - > ((unsigned char *) tswapl(__mhdr->msg_control) | |
188 | + > ((unsigned char *) (unsigned long) tswapl(__mhdr->msg_control) | |
189 | 189 | + tswapl(__mhdr->msg_controllen)))) |
190 | 190 | /* No more entries. */ |
191 | 191 | return 0; | ... | ... |