OSDN Git Service

Suppress pointer from integer of different size warning.
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 26 May 2007 15:18:52 +0000 (15:18 +0000)
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 26 May 2007 15:18:52 +0000 (15:18 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2862 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/syscall_defs.h

index 2989bb7..88f7a21 100644 (file)
@@ -182,10 +182,10 @@ __target_cmsg_nxthdr (struct target_msghdr *__mhdr, struct target_cmsghdr *__cms
 
   __cmsg = (struct target_cmsghdr *) ((unsigned char *) __cmsg
                                + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len)));
-  if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) tswapl(__mhdr->msg_control)
+  if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) (unsigned long)tswapl(__mhdr->msg_control)
                                         + tswapl(__mhdr->msg_controllen))
       || ((unsigned char *) __cmsg + TARGET_CMSG_ALIGN (tswapl(__cmsg->cmsg_len))
-          > ((unsigned char *) tswapl(__mhdr->msg_control) 
+          > ((unsigned char *) (unsigned long) tswapl(__mhdr->msg_control) 
              + tswapl(__mhdr->msg_controllen))))
     /* No more entries.  */
     return 0;