Subject: | avoid warning: cast to pointer from integer of different size |
when compiling v1.11 I see a bunch of warnings like this:
CFITSIO.c: In function 'XS_Astro__FITS__CFITSIO_ffmkys':
util.h:17:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define FitsFileSV(_SV) ((FitsFile *)SvIV((SV*)SvRV(_SV)))
^
they can be "solved" by patching util.h like this:
- #define FitsFileSV(_SV) ((FitsFile *)SvIV((SV*)SvRV(_SV)))
- #define fitsfileSV(_SV) (FitsFileSV(_SV)->fptr)
+ #define FitsFileSV(_SV) INT2PTR(FitsFile *, (SvIV((SV*)SvRV(_SV))))
+ #define fitsfileSV(_SV) ((FitsFileSV(_SV))->fptr)
CFITSIO.c: In function 'XS_Astro__FITS__CFITSIO_ffmkys':
util.h:17:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define FitsFileSV(_SV) ((FitsFile *)SvIV((SV*)SvRV(_SV)))
^
they can be "solved" by patching util.h like this:
- #define FitsFileSV(_SV) ((FitsFile *)SvIV((SV*)SvRV(_SV)))
- #define fitsfileSV(_SV) (FitsFileSV(_SV)->fptr)
+ #define FitsFileSV(_SV) INT2PTR(FitsFile *, (SvIV((SV*)SvRV(_SV))))
+ #define fitsfileSV(_SV) ((FitsFileSV(_SV))->fptr)