[MPlayer-cvslog] r37279 - trunk/m_struct.h

reimar subversion at mplayerhq.hu
Wed Sep 17 18:55:10 CEST 2014


Author: reimar
Date: Wed Sep 17 18:55:09 2014
New Revision: 37279

Log:
Use intptr_t to cast a pointer.

Avoids warnings especially when compiling for 64-bit Windows.

Patch by Stephen Sheldon [sfsheldo gmail].

Modified:
   trunk/m_struct.h

Modified: trunk/m_struct.h
==============================================================================
--- trunk/m_struct.h	Tue Sep  9 12:52:21 2014	(r37278)
+++ trunk/m_struct.h	Wed Sep 17 18:55:09 2014	(r37279)
@@ -62,7 +62,7 @@ typedef struct m_struct_st {
  *  \return Pointer to the struct field.
  */
 #define M_ST_MB_P(struct_p, struct_offset)   \
-    ((void *)((char *)(struct_p) + (unsigned long)(struct_offset)))
+    ((void *)((char *)(struct_p) + (intptr_t)(struct_offset)))
 
 /// Access a struct field at a given offset.
 /** \param member_type Type of the field.


More information about the MPlayer-cvslog mailing list