-----Original Message----- From: Nicholas Clark [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 17:03 To: Steve Peters Cc: perl5-porters@perl.org Subject: Re: [PATCH] Squish warnings in POSIX.xs
On Wed, Jul 27, 2005 at 11:01:00AM -0500, Steve Peters wrote: > POSIX.xs has recently been giving the following warnings: > > POSIX.xs: In function `XS_POSIX_sigaction': > POSIX.xs:1348: warning: comparison of distinct pointer types lacks a cast > POSIX.xs:1357: warning: assignment from incompatible pointer type > > The problem comes with assigning Perl's Sigaction_t to sigaction.sa_handler. > It > seems to like C<void *>, so that's what we can give it. It's paassing its > tests from what I can see, but we'll see how the smokes do on platforms other > than Linux and OpenBSD. Casting pointers to functions to pointers to data isn't conformant ANSI C. ----- These casts can be "laundered" via a (sufficiently) long unsigned integer. Use FPTR2DPTR and DPTR2FPTR defined in perl.h Robin ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY -------------------------------------------------------------------