Skip Menu |

This queue is for tickets about the Astro-FITS-CFITSIO CPAN distribution.

Report information
The Basics
Id: 118398
Status: new
Priority: 0/
Queue: Astro-FITS-CFITSIO

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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)