[MPlayer-dev-eng] [patch] change long to intptr_t

Stephen Sheldon sfsheldo at gmail.com
Thu Sep 11 20:54:36 CEST 2014


The attached patch gets rid of a slew of warnings when compiling for 
Windows 64-bit, where a long is only 4 bytes.

In file included from m_option.c:1425:0:
m_option.c: In function 'find_obj_desc':
m_struct.h:65:36: warning: cast from pointer to integer of different 
size [-Wpointer-to-int-cast]
      ((void *)((char *)(struct_p) + (unsigned long)(struct_offset)))
                                     ^
m_struct.h:74:22: note: in expansion of macro 'M_ST_MB_P'
      (*(member_type*) M_ST_MB_P ((struct_p), (struct_offset)))
                       ^
m_option.c:1435:9: note: in expansion of macro 'M_ST_MB'
      n = M_ST_MB(char*,l->list[i],l->name_off);
          ^
m_struct.h:65:36: warning: cast from pointer to integer of different 
size [-Wpointer-to-int-cast]
      ((void *)((char *)(struct_p) + (unsigned long)(struct_offset)))
                                     ^
m_struct.h:74:22: note: in expansion of macro 'M_ST_MB_P'
      (*(member_type*) M_ST_MB_P ((struct_p), (struct_offset)))
                       ^

-------------- next part --------------
A non-text attachment was scrubbed...
Name: intptr.patch
Type: text/x-diff
Size: 485 bytes
Desc: not available
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140911/215ba715/attachment.bin>


More information about the MPlayer-dev-eng mailing list