From: Nicholas Clark Date: Mon, 28 Apr 2008 20:41:31 +0000 (+0000) Subject: Cast the result of fpsetmask(0) to (void), as some implementations X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad3a8c6706bd3a6f37807bfeb97ae631d2828ec9;p=p5sagit%2Fp5-mst-13.2.git Cast the result of fpsetmask(0) to (void), as some implementations expand it via a macro, with a comma expression to calculate the return value, at which point gcc has the gall to warn that an expression calcualted is not used. Blame SCO for having to have fpsetmask(0) in the code to start with. p4raw-id: //depot/perl@33762 --- diff --git a/perl.h b/perl.h index 4cd9a2b..8e48b6d 100644 --- a/perl.h +++ b/perl.h @@ -2651,7 +2651,11 @@ typedef struct clone_params CLONE_PARAMS; # if HAS_FLOATINGPOINT_H # include # endif -# define PERL_FPU_INIT fpsetmask(0) +/* Some operating systems have this as a macro, which in turn expands to a comma + expression, and the last sub-expression is something that gets calculated, + and then they have the gall to warn that a value computed is not used. Hence + cast to void. */ +# define PERL_FPU_INIT (void)fpsetmask(0) # else # if defined(SIGFPE) && defined(SIG_IGN) && !defined(PERL_MICRO) # define PERL_FPU_INIT PL_sigfpe_saved = (Sighandler_t) signal(SIGFPE, SIG_IGN)